Simulate. Learn. Succeed.
LearnCo is an open-source, self-hosted platform that creates realistic simulated business environments for university education. It bridges the gap between theoretical knowledge and practical application by providing students with hands-on experience in a controlled, realistic corporate setting.
LearnCo transforms traditional university teaching by offering:
- Authentic Business Simulation: Students interact with a fully-functional corporate website, complete with public-facing pages and secure internal systems
- AI-Powered Interactions: Engage with simulated employees through intelligent chatbots, each with distinct personalities and roles
- Multi-Disciplinary Learning: Supports diverse courses from web development to cybersecurity, all using the same realistic business context
- Scenario-Based Education: Instructors can create custom scenarios tailored to specific learning objectives
- Safe Learning Environment: Students can explore, make mistakes, and learn without real-world consequences
Designed specifically for resource-conscious university departments, LearnCo uses 100% open-source technologies and can be self-hosted on modest hardware or cloud infrastructure.
- Public Website: Simulated company website with editable content
- Password-Protected Areas: Secure access to documents and resources
- AI-Powered Chatbots: Simulated employees with different personas
- Appointment Scheduling: Realistic meeting scheduling with chatbots
- Document Management: Support for various file types with access control
- Scenario Management: Create and manage different teaching scenarios
- Time-Based Content: Materials that unlock based on schedule
- Frontend: Next.js 14 with TypeScript, Tailwind CSS
- CMS: Strapi 4 (headless CMS)
- Backend: Node.js with Express
- Database: PostgreSQL 15
- Cache: Redis 7
- Storage: MinIO (S3-compatible)
- Reverse Proxy: Nginx
- LLM: Ollama (self-hosted) or OpenRouter API
- Container: Docker & Docker Compose
- Docker and Docker Compose installed
- Node.js 18+ (for local development)
- 8GB RAM minimum (16GB recommended for running Ollama)
- 20GB free disk space
-
Clone the repository
git clone https://github.com/your-org/learnco.git cd learnco -
Set up environment variables
npm run setup:env
This will create a
.envfile with secure random values. Review and update as needed. -
Start the services
docker-compose up -d
-
Access the applications
- Frontend: http://localhost
- Strapi Admin: http://localhost/cms/admin
- Backend API: http://localhost/api
- MinIO Console: http://localhost:9001
- Adminer (DB): http://localhost:8080
- Mailhog: http://localhost:8025
Key environment variables in .env:
POSTGRES_*: Database configurationMINIO_*: Object storage settingsJWT_SECRET: Authentication secretsLLM_PROVIDER: Choose between 'ollama' or 'openrouter'BUSINESS_HOURS_*: Configure chatbot availability
-
Create Strapi Admin User
- Navigate to http://localhost/cms/admin
- Create your first admin user
-
Configure Content Types
- Set up public page content types
- Configure document categories
- Create user roles and permissions
-
Set Up MinIO Buckets
- Access MinIO at http://localhost:9001
- Create
learnco-documentsbucket - Set appropriate access policies
learnco/
├── frontend/ # Next.js frontend application
├── backend/ # Express API server
├── cms/ # Strapi CMS
├── database/ # PostgreSQL init scripts
├── nginx/ # Nginx configuration
├── storage/ # MinIO data (git-ignored)
├── data/ # Docker volumes (git-ignored)
├── scripts/ # Utility scripts
├── docker-compose.yml
└── .env.example
# Start development environment
npm run dev
# Run specific service
docker-compose up frontend -d
# View logs
docker-compose logs -f [service-name]
# Stop all services
docker-compose down-
New API Endpoint
- Add route in
backend/src/routes/ - Create controller in
backend/src/controllers/ - Update API documentation
- Add route in
-
New Frontend Page
- Create page in
frontend/src/pages/ - Add components in
frontend/src/components/ - Update navigation
- Create page in
-
New Chatbot Persona
- Add to database seed file
- Configure in Strapi
- Set availability schedule
- All secrets are auto-generated during setup
- Passwords are hashed using bcrypt
- JWT tokens for authentication
- Role-based access control (RBAC)
- Document access logging
- Rate limiting on API endpoints
-
Port conflicts
- Check if ports 80, 3000, 8000, 1337, 5432 are in use
- Modify port mappings in docker-compose.yml
-
Database connection errors
- Ensure PostgreSQL container is healthy
- Check database credentials in .env
-
Storage issues
- Verify MinIO is running:
docker-compose ps minio - Check bucket permissions
- Verify MinIO is running:
# View all logs
docker-compose logs
# View specific service logs
docker-compose logs -f backend
# Check container status
docker-compose ps- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for university teaching and learning
- Designed to be intentionally vulnerable for security courses
- Not intended for production use
For issues and questions:
- Create an issue on GitHub
- Contact the development team
- Check the documentation wiki