Quick Start Guide
This guide will help you set up Millenium Potters on your local machine for development or evaluation purposes.Prerequisites
Before you begin, ensure you have the following installed:Node.js 18+
Download from nodejs.org
PostgreSQL 18
Required for local development database
Installation Steps
Clone the Repository
First, clone the Millenium Potters repository to your local machine:The project structure includes:
Install Dependencies
Install dependencies for both frontend and backend:See:
The backend includes Prisma ORM for database management and Supabase for authentication. The frontend uses Next.js 14 with Tailwind CSS and Aceternity UI components.
~/workspace/source/frontend/package.json and ~/workspace/source/backend/package.jsonConfigure Environment Variables
Create environment files for local development.
Backend Configuration
Createbackend/.env.local:backend/.env.local
Frontend Configuration
Createfrontend/.env.local:frontend/.env.local
Replace
YOUR_PASSWORD with your PostgreSQL password. For Supabase credentials, create a free account at supabase.com.Set Up the Database
Initialize the database schema using Prisma:This creates:Access the UI at: http://localhost:5555
This creates all necessary tables including Users, Unions, UnionMembers, Loans, Repayments, and more. See the complete schema at
~/workspace/source/backend/prisma/schema.prisma.Optional: Seed Sample Data
To populate the database with sample data for testing:- Sample users (admin, supervisor, credit officers)
- Test unions and members
- Example loans with repayment schedules
Database Management Tools
Open Prisma Studio to view and edit your data:Start the Development Servers
Run both the backend API and frontend application:
The
dev:local script uses the .env.local file for configuration. For production, use npm run dev which reads from .env.Access the Application
Once both servers are running:Frontend
Backend API
Health Check
Log In and Explore
Open your browser to http://localhost:3000 and log in.
Default Credentials
If you ran the seed script, use these default accounts:| Role | Password | |
|---|---|---|
| Admin | admin@millenium.com | admin123 |
| Supervisor | supervisor@millenium.com | super123 |
| Credit Officer | officer@millenium.com | officer123 |
Take the Interactive Tour
After logging in:- The Command Center Tour will start automatically
- Or click your profile icon → “Take Tour” to start it manually
- Learn about dashboard features, navigation, and quick actions
~/workspace/source/frontend/package.json:62 (Shepherd.js integration)Verify Your Installation
Check Backend Health
Check Backend Health
Test the backend API is running:Expected response:
Check Database Connection
Check Database Connection
Verify Prisma can connect to PostgreSQL:You should see: ”✓ Introspection complete”
Test Authentication
Test Authentication
Try logging in through the frontend UI or test the login endpoint:You should receive a JWT token in the response.
Next Steps
Now that you have Millenium Potters running locally, explore these features:Create a Union
Go to Business Management → Unions → Add Union
Register Members
Add members to your union with full profile details
Process a Loan
Create a loan application and walk through the approval workflow
Record Repayments
Record payments and see the repayment schedule update automatically
Common Issues
Database Connection Error
Database Connection Error
Error:
Can't reach database server at localhost:5432Solution:- Ensure PostgreSQL is running:
sudo systemctl status postgresql - Check the port number in your DATABASE_URL
- Verify your PostgreSQL password is correct
Port Already in Use
Port Already in Use
Error:
Port 5000 is already in useSolution:- Change the PORT in
backend/.env.localto a different value (e.g., 5001) - Update
NEXT_PUBLIC_API_URLinfrontend/.env.localto match - Or kill the process using port 5000:
lsof -ti:5000 | xargs kill
Prisma Client Not Generated
Prisma Client Not Generated
Error:
@prisma/client did not initialize yetSolution:Frontend Build Errors
Frontend Build Errors
Error: Module not found errorsSolution:
Development Scripts
Useful commands for development:Backend Scripts
~/workspace/source/backend/package.json:6-20
Frontend Scripts
~/workspace/source/frontend/package.json:5-10
What’s Next?
Architecture Overview
Learn about the system architecture and technology stack
User Guide
Complete guide for using all features of the platform
API Reference
Explore REST API endpoints for integration
Deployment
Deploy to production with CockroachDB and Vercel
