Sippy Life is Nigeria's innovative wholesale beverage platform, revolutionizing how businesses and individuals access premium drinks. This MVP serves as a quick demonstration of my backend development skills, showcasing essential features such as user authentication, order management, group ordering, payment processing, and real-time order tracking.
- User Authentication (Signup, Login, Role-based Access Control)
- Order Management (Create Orders, Track Orders, Group Orders)
- Payment Processing (Paystack Integration)
- Real-Time Order Tracking (WebSockets for live updates)
- Inventory Management (Stock Updates & Alerts)
- API Documentation (Swagger/OpenAPI)
- Security (JWT Authentication, Protected Routes)
- Backend: Node.js, Express.js
- Database: PostgreSQL
- Authentication: JWT
- Payments: Paystack API
- Real-Time Updates: WebSockets (Socket.io)
- API Documentation: Swagger / OpenAPI
Ensure you have the following installed:
- Node.js (v14+)
- PostgreSQL
- Git
- A Paystack account (for payment processing)
git clone https://github.com/William9701/Sippy_backendProject.git
cd Sippy_backendProjectnpm installCreate a .env file in the root directory and configure the following:
PORT=5000
DB_NAME=beverage_db
DB_USER=postgres
DB_PASSWORD=your_password
DB_HOST=localhost
PAYSTACK_PUBLIC_KEY=your_paystack_public_key
JWT_SECRET=your_secret_key
PAYSTACK_SECRET_KEY=your_paystack_secret_key
npx sequelize-cli db:migratenpm run devServer runs on http://localhost:5000
- Endpoint:
POST /auth/signup - Payload:
{
"fullName": "John Doe",
"email": "johndoe@example.com",
"password": "securepassword"
}- Endpoint:
POST /auth/login - Payload:
{
"email": "johndoe@example.com",
"password": "securepassword"
}- Response: Session ID stored in cookies
- Endpoint:
POST /orders - Authorization: JWT Token required
- Payload:
{
"orderType": "single",
"orders": [
{ "productId": "123", "quantity": 2 },
]
}- Endpoint:
POST /orders - Payload:
{
"orderType": "group",
"orders": [
{ "productId": "123", "quantity": 2 },
{ "productId": "456", "quantity": 4 }
]
}- Endpoint:
GET /orders/track/:id
- Endpoint:
POST /payments/paystack - Payload:
{
"orderId": "xyz789",
"authorization_code": "AUTH_123ABC"
}- Response:
{
"authorization_url": "https://paystack.com/pay/example",
"charge_response": { "status": "success" }
}- Endpoint:
PUT /inventory/update-stock - Authorization: Admin only
- Payload:
{
"productId": "12345",
"newStock": 100
}- Import the provided Postman Collection.
- Ensure to include
-b cookie.txtafter login to use session authentication. - Update environment variables for API URLs and tokens.
curl -X POST http://localhost:5000/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "johndoe@example.com", "password": "securepassword"}' \
-c cookie.txtcurl -X POST http://localhost:5000/orders/create \
-H "Content-Type: application/json" \
-b cookie.txt \
-d '{"productId": "12345", "quantity": 2}'- JWT Authentication for secure access.
- Role-Based Access Control (Admins, Customers, Delivery Personnel).
- Session Management (Cookies for authentication).
- Data Validation using Joi/Express-validator.
This project uses Swagger/OpenAPI to document API endpoints.
- Visit
http://localhost:5000/api-docsafter running the server.
- Implement Gamification for customer engagement.
- AI-powered recommendations for products.
- Automated stock level monitoring.
If you'd like to contribute, feel free to fork the repo and submit a PR.
- Developer: Obi Obiesie William
- Email: williamobi818@gmail.com
- LinkedIn: https://www.linkedin.com/in/obi-william-29a2a2182/
This MVP is a demonstration of my backend development skills, showcasing authentication, order processing, payments, and real-time tracking. Built to be scalable, secure, and efficient, this serves as a foundation for Sippy Life’s digital expansion.
🚀 Let's build the future of beverage ordering! 🍾🥂