Installation Overview
LegoCity can be installed in different environments depending on your needs.
Installation Paths
For Users & Operators
If you want to deploy and use LegoCity:
- Quick Start - Get running in 5 minutes
- Local Installation - Full local development setup
- Production Deployment - Deploy to servers
For Developers & Contributors
If you want to develop and contribute to LegoCity:
- Development Environment - Complete dev setup
- Local Installation - Set up local environment
- Development Guide - Start building
Choose Your Setup
Local Development (Recommended for Development)
Best for: Developers, contributors, testing changes
What you get:
- ✅ Full control over codebase
- ✅ Hot reload during development
- ✅ Easy debugging
- ✅ Run tests locally
Requirements:
- Node.js 18+
- pnpm package manager
- MongoDB 6+
- Git
Time to setup: ~15 minutes
Docker Compose (Quickest Setup)
Best for: Quick testing, demonstrations, isolated environments
What you get:
- ✅ One-command setup
- ✅ All services containerized
- ✅ Easy cleanup
- ✅ Reproducible environment
Requirements:
- Docker Desktop or Docker Engine
- Docker Compose
Time to setup: ~5 minutes
Production Server (For Deployment)
Best for: Staging, production, public deployments
What you get:
- ✅ Optimized builds
- ✅ Scalable architecture
- ✅ Production-ready config
- ✅ SSL/HTTPS support
Requirements:
- Linux server (Ubuntu/Debian recommended)
- Node.js, MongoDB, Nginx
- Domain name (optional)
Time to setup: ~30 minutes
System Requirements
Minimum Requirements
| Component | Requirement |
|---|---|
| CPU | 2 cores |
| RAM | 4 GB |
| Storage | 10 GB free space |
| OS | Windows 10+, macOS 11+, Linux |
Recommended Requirements
| Component | Requirement |
|---|---|
| CPU | 4+ cores |
| RAM | 8+ GB |
| Storage | 20+ GB SSD |
| Network | Stable internet connection |
Software Dependencies
Required
- Node.js: 18.x or 20.x (LTS versions)
- pnpm: 8.x or later
- MongoDB: 6.x or later
- Git: 2.x or later
Optional
- Docker: 24.x or later (for containerized setup)
- Nginx: 1.18+ (for production proxy)
- Redis: 7.x (for caching)
Installation Methods Comparison
| Feature | Local Dev | Docker Compose | Production |
|---|---|---|---|
| Setup Time | 15 min | 5 min | 30 min |
| Difficulty | Medium | Easy | Hard |
| Customization | High | Medium | High |
| Performance | Best | Good | Best |
| Scalability | Low | Low | High |
| For Development | ✅ | ⚠️ | ❌ |
| For Production | ❌ | ⚠️ | ✅ |
Pre-Installation Checklist
Before starting installation:
- [ ] Verify system requirements met
- [ ] Install required software (Node.js, pnpm, MongoDB)
- [ ] Have Mapbox access token ready (for maps)
- [ ] Prepare domain name (for production only)
- [ ] Review Architecture Overview
Common Installation Issues
Node.js Version Mismatch
Problem: Using unsupported Node.js version
Solution:
# Install nvm (Node Version Manager)
# Then use project's node version
nvm install 18
nvm use 18MongoDB Connection Failed
Problem: MongoDB not running or wrong connection string
Solution:
# Windows
net start MongoDB
# Linux/macOS
sudo systemctl start mongod
# Or use Docker
docker run -d -p 27017:27017 mongo:6Port Already in Use
Problem: Port 3000 already occupied
Solution:
# Find and kill process
npx kill-port 3000
# Or use different port
PORT=3001 pnpm devpnpm Not Found
Problem: pnpm not installed globally
Solution:
npm install -g pnpmPost-Installation
After successful installation:
Verify Setup
- [ ] Dashboard loads at http://localhost:3000
- [ ] Admin panel accessible at /admin
- [ ] Can create first user account
- [ ] Maps render correctly
Initial Configuration
- [ ] Set up admin account
- [ ] Configure data sources (Configuration Guide)
- [ ] Load sample data (optional)
Next Steps
- Read User Guide to learn features
- Explore Development Guide to customize
- Check Configuration for advanced setup
Getting Help
If you encounter issues:
- 📖 Troubleshooting Guide
- 🐛 GitHub Issues
- 💬 GitHub Discussions
- 📧 Contact: CTU-SematX Team
Ready to install? Choose your installation method:
- Local Development Setup - For developers
- Docker Setup - Quick start with containers
- Production Deployment - For staging/production