This repository contains the source code for a simple online store backend, built with Node.js and Express. The API provides endpoints for user authentication, user management, shopping cart, customers, and products.
Technologies • Getting Started • Contributing • License
This project was developed with the following technologies:
To clone and run this application, you'll need:
- Git
- Node.js v18 or higher installed on your computer.
(It is recommended to clone the front-end repository as well)
$ git clone https://github.com/ramoncibas/store-backend
$ cd store
Before running the server, make sure to install the necessary dependencies. Run the following command:
$ npm install
$ npm run dev #The server will start on port 5000 by default.
This backend includes API documentation using Swagger. After starting the server, you can access the documentation at: http://localhost:5000/docs/
The source code is organized into separate modules for better clarity and maintainability. Key modules include:
Key Modules | Description |
---|---|
Auth | Functions related to authentication |
User | User management |
Cart | Shopping cart operations |
Customer | Customer information |
Product | Product management |
Each module has its own routes defined in their respective files.
To run the application tests, it is necessary for the server to be running, as there are various tests that simulate a user's request, going through the entire server flow.
$ npm run dev #The server will start on port 5000 by default.
Next, execute the following command:
$ npm run test #The test suite will be executed.
This project is for study purposes too, so send me an email telling me what you are doing and why you are doing it, teach me what you know
All kinds of contributions are very welcome and appreciated!
- ⭐️ Star the project
- 🐛 Find and report issues
- 📥 Submit PRs to help solve issues or add features
- ✋ Give me suggestions for new features And make sure to read the Contributing Guide before making a pull request.
This project is under the MIT license. See the MIT. for more information.
Made with ♥ by Ramon Cibas 👋 Get in touch!