A Next.js application for memo management with Docker-based development and deployment.
- Docker and Docker Compose
- Git
-
Clone the repository
git clone https://github.com/ls1intum/memo.git cd memo -
Start the development environment
./docker-manage.sh up development
This will:
- Build the Next.js application with hot reload
- Start a PostgreSQL database
- Set up the complete development environment
-
Access the application
- Web Application: http://localhost:3000
- Database:
localhost:5432(for debugging tools)
-
Stop the development environment
./docker-manage.sh down development
- Code changes are automatically reflected (hot reload enabled)
- Database data persists between restarts
- Logs: View with
./docker-manage.sh logs development - Database shell: Access with
./docker-manage.sh db-shell development
-
Install dependencies
npm install # or yarn install -
Set up environment variables
cp docker/development/.env .env.local # Edit .env.local to use localhost database connection -
Start a PostgreSQL database (using Docker)
docker run -d \ --name memo-postgres \ -e POSTGRES_DB=memo_dev \ -e POSTGRES_USER=memo_user \ -e POSTGRES_PASSWORD=memo_password \ -p 5432:5432 \ postgres:16-alpine
-
Run the development server
npm run dev # or yarn dev
The project includes a convenient management script for all Docker operations:
# Start development environment
./docker-manage.sh up development
# View logs
./docker-manage.sh logs development
# Restart services
./docker-manage.sh restart development
# Connect to database
./docker-manage.sh db-shell development
# Connect to app container
./docker-manage.sh app-shell development
# Clean up (removes containers and volumes)
./docker-manage.sh clean developmentmemo/
βββ app/ # Next.js app directory
β βββ actions/ # Server Actions (API layer)
β βββ dashboard/ # Dashboard pages
β βββ session/ # Session management pages
β βββ onboarding/ # Onboarding flow
βββ components/ # React components
βββ domain_core/ # Domain-Driven Design layers
β βββ infrastructure/ # External clients (Prisma, utilities)
β βββ model/ # Domain entities & types
β βββ repositories/ # Data access layer
β βββ services/ # Business logic layer
βββ prisma/ # Database schema & migrations
βββ docker/ # Environment-specific configs
β βββ development/ # Local development
β βββ staging/ # Testing environment
β βββ production/ # Production environment
βββ scripts/ # Database initialization
βββ .github/workflows/ # CI/CD workflows
βββ docker-manage.sh # Docker management script
βββ Dockerfile # Multi-stage Docker build
βββ README.md # This file
The development environment is configured with:
- Hot Reload: Automatic code updates
- Volume Mounting: Source code changes reflected immediately
- Database: PostgreSQL with persistent data
- Port Mapping: Direct access to app (3000) and database (5432)
The project includes automated code quality checks:
# Run all quality checks
npm run quality
# Fix linting and formatting issues
npm run quality:fix
# Individual commands
npm run type-check # TypeScript type checking
npm run lint # ESLint linting
npm run lint:fix # Fix linting issues
npm run format # Format code with Prettier
npm run format:check # Check code formattingBefore submitting a PR, ensure:
-
npm run qualitypasses without errors -
npm run buildcompletes successfully - All tests pass (when implemented)
- No TODO/FIXME comments in production code
Located in docker/development/.env:
NODE_ENV=developmentDATABASE_URL=postgresql://memo_user:memo_password@localhost:5432/memo_devNEXT_PUBLIC_API_URL=http://localhost:3000/api
This project uses automated deployment via GitHub Actions:
- Staging: For testing features
- Production: Live environment
See DOCKER.md for detailed Docker setup information. See GITHUB_ACTIONS.md for CI/CD setup information.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Start development environment:
./docker-manage.sh up development - Make your changes
- Test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Database Setup & Migrations - Database management, migrations, and Prisma scripts
- Docker Setup - Detailed Docker configuration and deployment
- Claude Code Guide - Project conventions and AI assistant usage
- Next.js Documentation - learn about Next.js features and API
- Docker Documentation - containerization platform
- PostgreSQL Documentation - database system
- Prisma Documentation - ORM and database toolkit
Port already in use:
./docker-manage.sh down development # Stop any running containersPermission issues with docker-manage.sh:
chmod +x docker-manage.shDatabase connection issues:
./docker-manage.sh logs development # Check if database is running
./docker-manage.sh restart development # Restart all servicesFresh start:
./docker-manage.sh clean development # Remove all containers and volumes
./docker-manage.sh up development # Start freshFor more detailed troubleshooting, see DOCKER.md.
This project is part of the ls1intum organization.