A robust backend API for managing an e-commerce platform, built with modern and scalable technologies to ensure seamless performance and security.
- Express.js (TypeScript): A fast and reliable framework for building server-side applications.
- MongoDB: A NoSQL database to store and manage e-commerce data efficiently.
- Prisma: An ORM for smooth database interactions.
- Zod: Schema validation to ensure reliable and secure data handling.
- OAuth: Secure authentication and authorization system.
- Payment Gateway (Midtrans): Integrated payment processing for smooth transactions.
-
Product Management
- Add, update, and delete products.
- Manage product categories and stock levels.
-
User Authentication & Authorization
- Secure login and registration using OAuth.
- Role-based access control (e.g., Admin, User).
-
Order Management
- Handle order creation, tracking, and updates.
- Manage order status (Pending, Processing, Shipped, Delivered).
-
Payment Integration
- Secure payment processing using Midtrans.
- Real-time payment status updates and notifications.
-
Validation & Security
- Data validation using Zod to prevent invalid input.
- Authentication and token-based security to protect user data.
-
Scalable Architecture
- Modular code structure for easier maintenance and scalability.
git clone https://github.com/denisetiya/single-store-api.git
cd single-store-apinpm installCreate a .env file in the root directory and configure the following:
DATABASE_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/single-store
JWT_SECRET=<your_jwt_secret>
OAUTH_CLIENT_ID=<your_oauth_client_id>
OAUTH_CLIENT_SECRET=<your_oauth_client_secret>
MIDTRANS_CLIENT_KEY=<your_midtrans_client_key>
MIDTRANS_SERVER_KEY=<your_midtrans_server_key>
npx prisma migrate devnpm run devContributions are welcome!
- Fork the repository.
- Create a feature branch:
git checkout -b feature/new-feature. - Commit your changes:
git commit -m 'Add new feature'. - Push to the branch:
git push origin feature/new-feature. - Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.