This asset management system supports both local and team database configurations, allowing you to maintain your local database for lecturer requirements while collaborating with your team on a shared virtual database.
- Node.js and npm installed
- Docker Desktop (for team database)
- MySQL (for local database)
# Backend dependencies
cd backend
npm install
# Frontend dependencies
cd ../frontend
npm install
# Start virtual database (requires Docker)
npm run team:start
# Configure for team database
cd backend
npm run db:team
npm run prisma:push
# Configure for local database
cd backend
npm run db:local
npm run prisma:push
# Backend server
npm run dev:backend
# Frontend server (in new terminal)
npm run dev:frontend
Database | Port | Purpose | Environment |
---|---|---|---|
Local | 3307 | Lecturer requirements | env.local |
Team | 3308 | Team collaboration | env.team |
# Switch to team database
cd backend && npm run db:team
# Switch to local database
cd backend && npm run db:local
# Sync from local to team
npm run sync:local-to-team
# Sync from team to local
npm run sync:team-to-local
# Start team database
npm run team:start
# Stop team database
npm run team:stop
# Check database status
npm run team:status
- phpMyAdmin: http://localhost:8080 (Team database only)
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
Database Design/
βββ backend/ # Backend API
β βββ prisma/ # Database schema
β βββ src/ # Source code
βββ frontend/ # Next.js frontend
βββ database/ # Database initialization
βββ scripts/ # Utility scripts
βββ docker-compose.yml # Team database setup
βββ env.local # Local database config
βββ env.team # Team database config
βββ TEAM_SETUP.md # Detailed setup guide
npm run team:start
- Start team virtual databasenpm run team:stop
- Stop team virtual databasenpm run team:status
- Check database statusnpm run setup:team
- Setup team databasenpm run setup:local
- Setup local database
npm run sync:local-to-team
- Sync local β teamnpm run sync:team-to-local
- Sync team β local
npm run dev:backend
- Start backend servernpm run dev:frontend
- Start frontend server
- TEAM_SETUP.md - Detailed team setup guide
- DOCKER_SETUP.md - Docker installation guide
- config/database-config.md - Database configuration details
- Install Docker Desktop
- Ensure Docker is running
- Check port 3307 is available
- Verify environment files are correct
- Check database is running
- Verify credentials
- Team database uses port 3308
- Local database uses port 3307
- Change ports in docker-compose.yml if needed
- Clone the repository
- Install dependencies
- Start team database:
npm run team:start
- Configure for team:
cd backend && npm run db:team
- Start development:
npm run dev:backend
- Use
npm run sync:local-to-team
to share your local data - Use
npm run sync:team-to-local
to get team updates - Always backup before syncing
If you encounter issues:
- Check the troubleshooting section
- Verify Docker is running
- Check database logs:
docker compose logs db
- Ensure no port conflicts