Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b7fe846
Phase 1.1: Complete project initialization with config
NonsoBarn Dec 17, 2025
e0bc642
Phase 1.2: Complete Docker setup with PostgreSQL and Redis
NonsoBarn Dec 17, 2025
3b784f3
Phase 1.3: Complete database setup with TypeORM, migrations, and seeders
NonsoBarn Dec 17, 2025
259a325
Phase 1.4: Complete error handling with filters, logging, and request…
NonsoBarn Dec 17, 2025
94ec367
Phase 2.1: Complete user registration with validation and password ha…
NonsoBarn Dec 17, 2025
a6a1773
Phase 2.1: Complete user registration with validation and password ha…
NonsoBarn Dec 18, 2025
71486b6
Phase 2.1.1: Add API versioning structure (v1) with URI-based versio…
NonsoBarn Dec 18, 2025
0967c78
Phase 2.2: Complete JWT authentication with login and refresh tokens
NonsoBarn Dec 19, 2025
ea1f715
Phase 2.2.2: ESLint and Type error fix
NonsoBarn Dec 19, 2025
09064d7
Phase 2.3: Complete RBAC with roles decorator and guards
NonsoBarn Dec 22, 2025
c9189e3
Phase 2.4: Complete user profiles with role-specific data
NonsoBarn Dec 23, 2025
1c12de6
Phase 3.1: Implement AWS S3 storage service
NonsoBarn Dec 24, 2025
4d13622
Ignore .env.development
NonsoBarn Dec 24, 2025
c14141a
Add AWS S3 storage testing endpoints and verify integration
NonsoBarn Dec 24, 2025
4f2df40
Add Cloudinary storage service with transformations
NonsoBarn Dec 26, 2025
fbc701b
Phase 4.1-4.2: Complete category management system
NonsoBarn Jan 31, 2026
4af5038
Phase 4.3: Complete product management system
NonsoBarn Jan 31, 2026
51a92b0
Phase 4.4: Complete product image upload system with Cloudinary
NonsoBarn Jan 31, 2026
cfbb626
Phase 5: Complete shopping cart system with Redis
NonsoBarn Feb 7, 2026
8e43cff
Phase 6: Complete Order creation & Status workflow
NonsoBarn Feb 14, 2026
5398a4c
Phase 7: Complete Payment Integration
NonsoBarn Feb 15, 2026
87d3287
Phase 8: Complete Rider & Delivery System
NonsoBarn Feb 21, 2026
4ae6840
Phase 9: Real-time Features (WebSockets)
NonsoBarn Feb 21, 2026
57e2fb6
Phase 10: Complete Background Job, Email & SMS Notifications Provider…
NonsoBarn Feb 21, 2026
c74ffa9
Phase 10.2:In-App Notifications & Scheduled Jobs
NonsoBarn Mar 1, 2026
46a12d2
Phase 11: Implementing Reviews & Ratings
NonsoBarn Mar 2, 2026
6a7a40c
Phase 12: Admin Dashboard x Vendor table
NonsoBarn Mar 2, 2026
71e918d
Phase 13: Testing
NonsoBarn Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Dependencies (will be installed in container)
node_modules
npm-debug.log

# Build output (will be built in container)
dist
build

# Development files
.git
.gitignore
README.md
.env
.env.*

# Testing
coverage
.nyc_output

# IDE
.vscode
.idea
*.swp
*.swo

# OS
.DS_Store
Thumbs.db
17 changes: 17 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NODE_ENV=production
PORT=3000

# These will be set in production environment
DB_HOST=
DB_PORT=
DB_USERNAME=
DB_PASSWORD=
DB_NAME=

REDIS_HOST=
REDIS_PORT=

JWT_SECRET=
JWT_EXPIRATION=
JWT_REFRESH_SECRET=
JWT_REFRESH_EXPIRATION=
55 changes: 55 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
NODE_ENV=test
PORT=3001

# Separate test database — wiped and recreated on every e2e test run
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_NAME=food_delivery_test

REDIS_HOST=localhost
REDIS_PORT=6379

# Short-lived test secrets (not real secrets)
JWT_SECRET=test-jwt-secret-at-least-32-characters-long-here
JWT_ACCESS_TOKEN_EXPIRATION=15m
JWT_REFRESH_TOKEN_SECRET=test-refresh-secret-at-least-32-chars-here
JWT_REFRESH_TOKEN_EXPIRATION=7d

STORAGE_PROVIDER=local
MAX_FILE_SIZE=5242880

# Stub providers — no real emails/SMS sent during tests
DEFAULT_EMAIL_PROVIDER=stub
DEFAULT_SMS_PROVIDER=stub

# Stub payment keys
PAYSTACK_SECRET_KEY=sk_test_stub
STRIPE_SECRET_KEY=sk_test_stub
FLUTTERWAVE_SECRET_KEY=FLWSECK_TEST-stub

# AWS stubs (required by config validation, not called in tests)
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=stub
AWS_SECRET_ACCESS_KEY=stub
AWS_S3_BUCKET=stub
AWS_S3_PUBLIC_URL=https://stub.s3.amazonaws.com
CLOUDINARY_CLOUD_NAME=stub
CLOUDINARY_API_KEY=stub
CLOUDINARY_API_SECRET=stub
DO_SPACES_ENDPOINT=stub.digitaloceanspaces.com
DO_SPACES_REGION=nyc3
DO_SPACES_ACCESS_KEY_ID=stub
DO_SPACES_SECRET_ACCESS_KEY=stub
DO_SPACES_BUCKET=stub
DO_SPACES_PUBLIC_URL=https://stub.digitaloceanspaces.com
AWS_SES_FROM_EMAIL=test@test.com
AWS_SES_FROM_NAME=Test
SENDGRID_API_KEY=SG.stub
SENDGRID_FROM_EMAIL=test@test.com
SENDGRID_FROM_NAME=Test
AWS_SNS_SENDER_ID=TestApp
TWILIO_ACCOUNT_SID=ACstub
TWILIO_AUTH_TOKEN=stub
TWILIO_PHONE_NUMBER=+10000000000
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/build

# Logs
logs/
logs
*.log
npm-debug.log*
Expand Down Expand Up @@ -54,3 +55,5 @@ pids

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
.env.development
.env.development
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:20-alpine

WORKDIR /app

# Copy package files
COPY package.json yarn.lock ./

# Install dependencies with Yarn
RUN yarn install --frozen-lockfile

# Verify nest CLI is installed
RUN npx nest --version

# Copy source code and config
COPY . .

# Create logs directory
RUN mkdir -p /app/logs

# Expose port 3000
EXPOSE 3000

# Run with hot-reload using Yarn
CMD ["yarn", "start:dev"]
Binary file added MenuVector.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
command: yarn start:dev # Hot reload
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- /app/node_modules
environment:
NODE_ENV: development
71 changes: 71 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: food_delivery_db
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: food_delivery_dev
ports:
- '5432:5432'
volumes:
# Persist data even if container is removed
- postgres_data:/var/lib/postgresql/data
networks:
- food_delivery_network

# Redis Cache
redis:
image: redis:7-alpine
container_name: food_delivery_redis
restart: unless-stopped
ports:
- '6379:6379'
volumes:
- redis_data:/data
networks:
- food_delivery_network

# NestJS Application
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- '3000:3000'
env_file:
- .env.development
environment:
NODE_ENV: development
PORT: 3000
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_NAME: food_delivery_dev
REDIS_HOST: redis
REDIS_PORT: 6379
depends_on:
- postgres
- redis
volumes:
# Mount source code for hot reload in development
- ./src:/app/src
- ./package.json:/app/package.json
- ./logs:/app/logs
- /app/node_modules
networks:
- food_delivery_network

# Named volumes for data persistence
volumes:
postgres_data:
redis_data:

# Custom network for service communication
networks:
food_delivery_network:
driver: bridge
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default tseslint.config(
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
"prettier/prettier": ["error", { endOfLine: "auto" }],
'prettier/prettier': ['error', { endOfLine: 'auto' }],
},
},
);
17 changes: 17 additions & 0 deletions ormconfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DataSource } from 'typeorm';
import { config } from 'dotenv';

// Load environment variables
config({ path: `.env.${process.env.NODE_ENV || 'development'}` });

export default new DataSource({
type: 'postgres',
host: process.env.DB_HOST || 'localhost',
port: parseInt(process.env.DB_PORT ?? '5432', 10),
username: process.env.DB_USERNAME || 'postgres',
password: process.env.DB_PASSWORD || 'postgres',
database: process.env.DB_NAME || 'food_delivery_dev',
entities: ['src/**/*.entity{.ts,.js}'],
migrations: ['src/database/migrations/*{.ts,.js}'],
synchronize: false, // Always false for migrations
});
Loading