Skip to content

d1sd41n/CIES_app_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

CIES App Backend

An awesome sistem to register the items that enter and leave your facility automatically!!

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

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

Built With

Getting Started

Prerequisites

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

Installation

  1. Clone the repo

    git clone https://github.com/d1sd41n/CIES_app_backend.git
  2. Set env vars
    in .envs/.production/.postgres

     POSTGRES_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

  3. create an SSL certificate, rename the .crt and .key files to nginx.crt and nginx.key and add them to the sslfiles directory

  4. 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
  5. 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.

Author's notes

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

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Authors

Daniel Pérez - Twitter - github.com/d1sd41n

Luis Moreno - github.com/luismorenolopera

Daniel Gil - github.com/Jodagito

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages