Backend express nodejs Postgrest

backend for management system project
Explore the docs »

View Demo · Report Bug · Request Feature

About The Project

Backend characteristics

  • User login Role Admin, sellers, Cashier
  • Inventory Module
  • Purchasing Module
  • Sales Module
  • Billing Module

Many more modules, to guarantee customized control in businesses

Architecture

Architecture Diagram

Here you can include a diagram that shows the general architecture of the project.

Design patterns

The project follows the Model-View-Controller (MVC) design pattern to organize and structure the code in an efficient and modular manner.

Description of the MVC Pattern Model It represents the data structure and business logic of the project. Interacts with the database to perform CRUD (Create, Read, Update, Delete) operations. Examples of models in our project: User, Product, Order. View It is responsible for the presentation of information to the user. In a backend project, views can be JSON or XML responses generated to be consumed by the frontend or client side. In our case, views are API endpoints that return data in JSON format. Controller It acts as an intermediary between the Model and the View. It handles user requests, interacts with the Model and returns the appropriate response through the View. Main controllers in our project: UserController, ProductController, OrderController.

###Directory and File Structure

/backend
|-- /models
|   |-- user.js
|   |-- Services.js
|   |-- Seller.js
| much more model
|
|-- /controllers
|   |-- user.controller.js
|   |-- services.controller.js
|   |-- seller.controller.js
|
|-- /routes
|   |-- index.routes.js
|   |-- user.routes.js
|   |-- seller.routes.js
|   |--   
|
|-- app.js
|-- db.js
|-- routes.js


Database

  • Database: PostgreSQL
  • ORM: Sequelize
  • Models: Users, Products, Orders
  • Relationships:
    • A user can have multiple orders.
    • A product can belong to one or more orders.

(back to top)

Built With

Here are the technologies with which the system was developed

  • JavaScript

  • Node.js

  • Express

  • PostgreSQL

(back to top)

Installation

  1. Clone the repo
     git clone  https://github.com/zerontec/expressjs-postgres.git
  2. Install NPM packages
    npm install

4.You should have Postgrest installed

https://www.postgresql.org/download/

5.in the backend directory

npm start 

(back to top)

Roadmap

  • Add Changelog
  • Add back to top links
  • Add Additional Templates w/ Examples
  • Add "components" document to easily copy & paste sections of the readme
  • Multi-language Support
    • Chinese
    • Spanish

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  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

(back to top)

License

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

(back to top)

Contact

Leo Zeron - @zeronleo - devsignweb@gmail.com -leobertozeron@gmail.com

Project Link: https://github.com/zerontec/deskGledah

(back to top)

Acknowledgments

Used technology This project has been developed using the following technologies:

  • JavaScript: Main programming language used in the project.
  • Node.js: JavaScript runtime environment that allows you to run JavaScript code on the server.
  • Express.js: framework used to build the project's web API.
  • PostgreSQL: Relational database management system used to store and manage project data.

Libraries and Dependencies The project also uses various libraries and dependencies that have contributed to its development and operation:

bcrypt: Library for password hashing. jsonwebtoken: Library for creating and verifying JWT tokens. Sequelize: ORM (Object-Relational Mapping) used to interact with the PostgreSQL database. Thanks I want to express my gratitude to the developer community and maintainers of the libraries and tools mentioned above. I also want to thank anyone who has contributed, reported problems, suggested improvements, or used this project in any way.

This project would not be possible without the help and support of the open source community. Thank you all!