Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

ls1intum/memo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Memo

A Next.js application for memo management with Docker-based development and deployment.

πŸš€ Quick Start for Development

Prerequisites

Local Development Setup

  1. Clone the repository

    git clone https://github.com/ls1intum/memo.git
    cd memo
  2. 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
  3. Access the application

  4. Stop the development environment

    ./docker-manage.sh down development

Development Workflow

  • 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

πŸ›  Alternative Development Methods

Using npm/yarn directly (without Docker)

  1. Install dependencies

    npm install
    # or
    yarn install
  2. Set up environment variables

    cp docker/development/.env .env.local
    # Edit .env.local to use localhost database connection
  3. 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
  4. Run the development server

    npm run dev
    # or
    yarn dev

🐳 Docker Management

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 development

πŸ“ Project Structure

memo/
β”œβ”€β”€ 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

πŸ”§ Development Configuration

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)

Code Quality Tools

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 formatting

Pre-commit Checklist

Before submitting a PR, ensure:

  • npm run quality passes without errors
  • npm run build completes successfully
  • All tests pass (when implemented)
  • No TODO/FIXME comments in production code

Environment Variables (Development)

Located in docker/development/.env:

  • NODE_ENV=development
  • DATABASE_URL=postgresql://memo_user:memo_password@localhost:5432/memo_dev
  • NEXT_PUBLIC_API_URL=http://localhost:3000/api

πŸš€ Deployment

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.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Start development environment: ./docker-manage.sh up development
  4. Make your changes
  5. Test thoroughly
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to the branch: git push origin feature/amazing-feature
  8. Open a Pull Request

πŸ“š Documentation

Project Documentation

External Resources

πŸ†˜ Troubleshooting

Common Issues

Port already in use:

./docker-manage.sh down development  # Stop any running containers

Permission issues with docker-manage.sh:

chmod +x docker-manage.sh

Database connection issues:

./docker-manage.sh logs development  # Check if database is running
./docker-manage.sh restart development  # Restart all services

Fresh start:

./docker-manage.sh clean development  # Remove all containers and volumes
./docker-manage.sh up development     # Start fresh

For more detailed troubleshooting, see DOCKER.md.

πŸ“„ License

This project is part of the ls1intum organization.

About

Memo (Mnemosyne) - Benchmark for CBE Recommender Systems

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •