GithubHelp home page GithubHelp logo

jcao02 / lafabrika-backoffice-backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 232 KB

Backend services to hold backoffice operation within the company

Dockerfile 2.38% JavaScript 85.25% Shell 2.79% PLpgSQL 9.58%

lafabrika-backoffice-backend's Introduction

La Fábrika Backoffice Backend

Backend services to hold backoffice operation within the company.

Services

  • Accountability: Handles the company's accountability.
  • Database: Persists the data used by the services.
  • Migrations: System to make migrations in the database service.
  • Authentication: Handles the user authentication

Containers

The app is contained in Docker. Each service has its own Dockerfile and they're composed using the docker-compose.yml in the root folder.

Versions:

  1. docker: >=18.09.3
  2. docker-compose: >=1.23.2

To start developing:

  1. Go to services/database and run docker build . -t lafabrika/database:0.0.1
  2. Run npm install in each service and model that contains a package.json
  3. Go to the root folder and run docker-compose up

lafabrika-backoffice-backend's People

Contributors

jcao02 avatar arochadaniel avatar

Stargazers

Francisco avatar

Watchers

James Cloos avatar Jose Monagas avatar  avatar

lafabrika-backoffice-backend's Issues

Development scripts

  • Mount script
  • Start script
  • Migrate script (Will do it if necessary in the future)

Create users database

This includes only the migration to add the proper tables and constraints to hold users in the DB

  • Schema lafabrika
  • users table
  • Database path to lafabrika schema
  • Update migrations README.md

Dockerize development environment

  • Create base image.
  • Create Node image.
  • Create PostgreSQL image.
  • Create sqitch image.
  • Create app image.
  • Create docker-compose with app, db and migration services.
  • Update README.md

Development environment

Stack:

  • HapiJS (Routing)
  • Objection (ORM)
  • PostgreSQL
  • Sqitch (Migrations)

To-do:

  • Docker Image: Base (ubuntu + basic software).
  • Docker Image: NodeJS.
  • Docker Image: Sqitch.
  • Docker Image: accountability service.
  • Docker Image: users service.
  • Docker Image: authentication service.
  • Docker Image: PostgreSQL.
  • Docker compose to mount server
  • Mount script
  • Start script

Separate user private information from public information in Database

We currently have a table users which contains a password column. We need to add a new table called ùsers_private with the password column and remove the password column from the users.

This way the private information needs to be fetch explicitly making a join in both tables.

TODO:

  • Separate tables
  • Update check_user_password_combination function
  • Add function insert_user_with_password

User Stories

Authentication

  • As an anoymous user, I can sign-in to use the system.

Users

  • As an admin user, I can register non-admin users to manage the system.
  • As an admin user, I can delete non-admin users to remove them from the system.
  • As a user, I can change my password to set a new one.
  • As an admin user, I can reset a non-admin user password in case they forgot it.
  • As an admin user, I can list all the users in the system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.