This is a MVP e-commerce-like API developed from scratch. It allows you to manage users, clients, products and sales. The project follows the MVC architecture and includes user authentication with JWT.
This project was developed using:
Clone this repository to your local machine and access the cloned directory:
git clone git@github.com:clintonbrito/restful-api-ecommerce.git
cd restful-api-ecommerceRun this command to create all the project's Docker containers and install the dependencies:
docker compose up -d --buildIf you need to stop and remove the project's Docker containers, you can use the following command:
docker compose downCheck the docker logs using the command docker logs -f app which address is running the application and open your browser or any prefered API client in order to test the endpoints through the address below, for example:
http://127.0.0.1:3333Explore the API documentation to understand the available endpoints, request parameters, and responses. The documentation is built using Bruno 🐶, a fast and Git-friendly Opensource API client, which also provides an interactive and user-friendly interface.
-
Run the Application: Make sure the application is running locally. Follow the Getting Started section for instructions on starting the application.
-
Feel free to give a try to Bruno and download it: Check out the Download page and follow the instructions.
-
Open Bruno Desktop App: Once the application Docker containers are running ok, you can access the Bruno Desktop App.
-
Explore Endpoints: In the Bruno Desktop App, you just need to import
/docs/Ecommerce APIcollection folder and voilà: you'll find a list of available endpoints along with details about request parameters. Use this interface to understand how to interact with the API. The base URL of the API which you should use as an environment variable on Bruno is the following:http://127.0.0.1:3333
Feel free to explore and test the API directly any other API client you prefer. If you encounter any issues or have questions, refer to the Issues section for support.
For future features, I intend to include:
- Unit testing with a high code coverage;
- Date filtering for sales;
- Improve user authentication and authorization policy;
- Use Auth as a middleware instead of manually checking JWT credentials;
- Separate business logic in service layer;
- Work on better DTOs;
- Deploy the project on a cloud service.
This project adopts Gitmoji and the commit convention known as Conventional Commits. This means that we follow a standardized format for our commit messages, making it easier to generate changelogs and adopt semantic versioning.
Example commit messages format:
feat: add login functionality
fix: resolve issue with user registration
wip: connecting back-end to front-endThe branches in this project follow a specific pattern to facilitate organization and understanding of ongoing development. Some of the common prefixes used include feature/, bugfix/, docs/:
Example branch names:
feature/docker-setup
bugfix/eslint-errors
docs/update-readmeThis project is licensed under the MIT License. See the LICENSE file for details.

