An awesome sistem to register the items that enter and leave your facility automatically!!
Table of Contents
CIES is an app to automatically register items that enter and leave a company facilities using QR codes and a cell phone camera. Automatically records in a database all the details of each item that enters or leaves the installation, It also allows to create automatic reports in case of item loss and allows the automatic sending of emails to inform the owner of the lost item if it is found
The project is divided into three subprojects: backend, web frontend, mobile frontend; each one in its respective repository. This repository is the backend code source
Web frontend: https://github.com/d1sd41n/CIES_app_web_frontend
Mobile frontend: https://github.com/d1sd41n/CIES_app_frontend_mobile
Features implemented in the backend:
- User management system
- User login
- User roles and permissions
- Registration of visitors and items
- Queries of user, items and visit history data
- Lost property report
- Automatic sending of emails
- Automatic generation of hashes and QR codes pages in pdf format ready to print
In order to make the program work, we must have Docker and Docker Compose installed on the system and have an account at sendgrid.com
-
Clone the repo
git clone https://github.com/d1sd41n/CIES_app_backend.git
-
Set env vars
in .envs/.production/.postgresPOSTGRES_DB=mydb POSTGRES_USER=example POSTGRES_PASSWORD=secret DB_HOST=db DB_PORT=5432
.envs/.production/.django
DJANGO_SECRET_KEY=l46a%a8c@jn^vk$bj)0@eh1au8&-ypngcv^3jf9w40!d$(7uq^ EMAIL_USER=user EMAIL_PASSWORD=password
The fields EMAIL_USER and EMAIL_PASSWORD are your username and the password of the Sendgrid api that receives orders to send emails
-
create an SSL certificate, rename the .crt and .key files to nginx.crt and nginx.key and add them to the sslfiles directory
-
build the project images using docker compose and then enter the web container to create a django superuser
$ docker-compose -f production.yml up --build $ docker-compose -f dev.yml run web sh
inside web container
$ python manage.py createsuperuser
-
This app uses the user system that django brings by default, so the next step will be to enter the django administrator and create the following user groups that define the roles in the system, these are:
Developer, Manager, Superviser, Guard
With these configurations the project is ready to work, now the following thing is to proceed to create a company, create and assign to it a user through the "usuario" model (a model that we create to extend the user model that brings Django by default), and then add the "Manager" group to the user; this can be done from the django admin. Once this is done, you can use that user to log in from either of the two frontend applications from where from now on you can manage the entire system without touching the backend anymore.
At the moment this is all the documentation, in case someone is interested in using this project for something or would like to contribute, you can contact me on my twitter and I will expand the documentation
In the next few days I will be uploading the web and mobile frontend
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Daniel Pérez - Twitter - github.com/d1sd41n
Luis Moreno - github.com/luismorenolopera
Daniel Gil - github.com/Jodagito