A comprehensive full-stack web application that connects customers with suppliers for packaging needs. Built with NestJS, Next.js, and PostgreSQL, it provides a robust platform for managing order requests and supplier interests.
🎉 Packaging Supply System is live at the following address: https://packaging-supply-system.vercel.app
Admin:
admin.mov
Customer:
customer.mov
Supplier:
supplier.mov
- Framework: NestJS with TypeScript
- Database: PostgreSQL with TypeORM
- Authentication: JWT-based auth with role-based access control
- API: RESTful API with comprehensive endpoints
- Framework: Next.js 15 with React 19
- Styling: Tailwind CSS with custom components
- State Management: Redux Toolkit
- UI Components: Radix UI with custom styling
- Form Handling: React Hook Form with Zod validation
Create .env files in both backend and frontend directories with appropriate configuration for your environment. .env.example files are provided as templates.
- Docker and Docker Compose installed
-
Clone the repository:
git clone https://github.com/ilhanozkan/packaging_supply_system.git cd packaging_supply_system -
Start the backend services:
cd backend docker-compose up -d -
The backend will be available at
http://localhost:8080- API endpoints:
http://localhost:8080/api/v1 - Database: PostgreSQL on port 5432 (in docker network)
- API endpoints:
When deploying to production platforms (Heroku, AWS, DigitalOcean, etc.), set the following environment variables:
NODE_ENV=production
PORT=8080
DB_TYPE=postgres
DB_HOST=your-db-host
DB_PORT=5432
DB_USERNAME=your-db-username
DB_PASSWORD=your-db-password
DB_DATABASE=your-db-name
DB_SYNCHRONIZE=false
DB_LOGGING=false
JWT_SECRET=your-super-secret-jwt-key-minimum-32-characters
JWT_EXPIRES_IN=1d# Start with default docker-compose.yml (development mode)
$ docker-compose up --build
# Stop the application
$ docker-compose down# Using production Docker Compose (optimized build)
$ docker-compose -f docker-compose.prod.yml up --build -d
# Stop production environment
$ docker-compose -f docker-compose.prod.yml down-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open
http://localhost:3000in your browser
Create a .env.local file in the frontend directory with the following variables:
NEXT_PUBLIC_API_URL=http://localhost:8080/api/v1POST /api/v1/auth/register- User registrationPOST /api/v1/auth/login- User login
GET /api/v1/order-requests- List all order requestsPOST /api/v1/order-requests- Create new order requestGET /api/v1/order-requests/my-orders- Get user's ordersGET /api/v1/order-requests/:id- Get specific order request
POST /api/v1/supplier-interests- Express interest/submit offerGET /api/v1/supplier-interests/my-interests- Get supplier's interestsGET /api/v1/supplier-interests/order-request/:id- Get interests for order
GET /api/v1/product-types- List active product typesGET /api/v1/product-types/all- List all product types (admin)
GET /api/v1/admin/users- List all usersGET /api/v1/admin/product-types- List all product types
- CUSTOMER: Create order requests, view offers
- SUPPLIER: Browse orders, submit interests and offers
- ADMIN: Full system access and management
UML diagram available in the backend/uml/diagram.puml file.
- Users: Customer, supplier, and admin accounts
- Order Requests: Packaging requirements from customers
- Order Items: Specific products within an order
- Supplier Interests: Supplier responses and offers
- Product Types: Available packaging categories
This project is licensed under the MIT license.