⚠ For now, because I'm using a free Render plan, the production server will spin down due to inactivity, and the first connection you'll make will take around 1 minute. The later connections should take half a second. ⚠
The DevShop API is a project built using Node.js, Express.js, Passport.js, and PostgreSQL, designed to simulate the functionality of an e-commerce platform. This API provides a range of features and follows best practices, making it a robust foundation for testing and development purposes.
The DevShop API offers the following key features:
- Sequelize ORM: Utilizes Sequelize as an Object-Relational Mapping (ORM) tool to interact with the PostgreSQL database efficiently.
- Express.js Endpoints: Manages various endpoints using Express.js, facilitating the handling of HTTP requests.
- Authentication and Authorization: Implements authentication layers with Passport.js and enforces role-based authorization using JSON Web Tokens (JWT) to identify users.
- Clean Architecture: Follows The Clean Architecture principles to maintain a well-structured and maintainable codebase.
- Middleware Usage: Employs middleware to execute request validations and capture errors, including custom error handling using Boom. Joi is used to validate incoming request data to ensure it adheres to predefined schemas.
To interact with the DevShop API, please read it's self hosted documentation: SwaggerDocs.
- Clone the repository:
git clone https://github.com/Lenoxo/DevShop.gitor use SSH. - Install the dependencies:
npm install - Create a
.envfile in the root directory and following the variables provided in.env.examplefile: - Run the docker processes with:
docker compose up postgres pgadmin - Run the database migrations until you finish:
npm run migrations:run - Run the development server:
npm run dev - Navigate to
http://localhost:3000/api-docs/to view the SwaggerDocs.
This project is licensed under the MIT License.
Lenoxo (Emanuel Padilla)
Feel free to reach out to me at emanuehl159@gmail.com for any inquiries, suggestions, or comments.