Spaces:
Sleeping
Sleeping
π Quick Start Guide
Prerequisites
Make sure you have these installed:
- β Docker & Docker Compose
- β Java 17 or higher
- β Node.js & npm (for frontend)
π― Option 1: Start Everything at Once (Recommended)
Start All Services (Backend + Frontend)
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
./start-all.sh
Stop All Services
./stop-all.sh
That's it! After running ./start-all.sh:
- Backend services will be ready in ~30 seconds
- Frontend will be available at http://localhost:3000 in ~45 seconds
π― Option 2: Start Services Separately
Backend Services Only
Start:
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
./run-system.sh
Stop:
./stop-system.sh
Frontend Only
Start:
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices/task-management-ui
npm install # First time only
npm start
Stop: Press Ctrl+C in the terminal
π― Option 3: Manual Docker Commands
If the scripts don't work, you can use Docker commands directly:
Start Backend
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
# Build all services first
./build-all.sh
# Start with Docker Compose
docker-compose up -d
# Check status
docker-compose ps
Stop Backend
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
docker-compose down
π Access the Application
Once everything is running:
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3000 | React web interface |
| API Gateway | http://localhost:8090 | Main API endpoint |
| Eureka Dashboard | http://localhost:8085 | Service discovery |
| Zipkin | http://localhost:9411 | Distributed tracing |
| User Service | http://localhost:8081 | User management |
| Task Service | http://localhost:8082 | Task management |
| Submission Service | http://localhost:8083 | Submission management |
π Troubleshooting
Check if services are running
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
docker-compose ps
All services should show "Up (healthy)".
View logs
# All services
docker-compose logs -f
# Specific service
docker-compose logs -f api-gateway
docker-compose logs -f user-service
Services not starting?
# Stop everything
docker-compose down
# Remove old containers and volumes
docker-compose down -v
# Rebuild and start fresh
./build-all.sh
docker-compose up -d
Frontend not loading?
cd task-management-ui
# Check if .env file exists
cat .env
# Should show: REACT_APP_API_BASE_URL=http://localhost:8090
# Reinstall dependencies
rm -rf node_modules package-lock.json
npm install
npm start
Port already in use?
# Check what's using the port (e.g., 3000)
lsof -i :3000
# Kill the process
kill -9 <PID>
ποΈ Architecture
βββββββββββββββββββ
β React UI β β You interact here (localhost:3000)
β (Frontend) β
ββββββββββ¬βββββββββ
β HTTP Requests
β
βββββββββββββββββββ
β API Gateway β β All requests go through here (localhost:8090)
β (Port 8090) β
ββββββββββ¬βββββββββ
β Service Discovery
β
βββββββββββββββββββ
β Eureka Server β β Manages all microservices (localhost:8085)
β (Port 8085) β
ββββββββββ¬βββββββββ
β
ββββββ΄βββββ¬βββββββββββββ
β β β
βββββββββββ ββββββββββββ βββββββββββββββ
β User β β Task β β Submission β
β Service β β Service β β Service β
β (8081) β β (8082) β β (8083) β
ββββββ¬βββββ ββββββ¬ββββββ ββββββββ¬βββββββ
β β β
βββββββββββββ΄ββββββββββββββββ
β
βββββββ΄βββββββ
β MongoDB β β Database (localhost:27017)
ββββββββββββββ
π Development Workflow
Starting development for the day
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
./start-all.sh
Making changes to backend code
- Make your changes in the respective service folder
- Rebuild that specific service:
cd TaskUserService # or TaskService, etc. ./gradlew build - Restart the service:
docker-compose restart user-service
Making changes to frontend code
- Just save the file - React hot reloads automatically! β¨
Ending development for the day
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservices
./stop-all.sh
π First Time Setup
If this is your first time running the project:
Clone the repository (if not already done)
Navigate to the project:
cd /home/garvitpathak27/cloud_computing/Task-Management-System-using-microservicesInstall frontend dependencies:
cd task-management-ui npm install cd ..Start everything:
./start-all.shWait ~1 minute for all services to start
Open your browser: http://localhost:3000
β Current Status
All services are currently running! π
You can verify by running:
docker-compose ps
To stop them:
./stop-all.sh
To restart them:
./start-all.sh
π‘ Tips
- First startup takes longer (~2-3 minutes) as Docker downloads images
- Subsequent startups are faster (~30 seconds)
- Frontend compilation takes ~10-15 seconds
- Check Eureka dashboard to see all registered services
- Use Zipkin to trace requests across microservices
- MongoDB data persists between restarts (stored in Docker volume)
π Need Help?
- Check the logs:
docker-compose logs -f - Verify all services are healthy:
docker-compose ps - Make sure ports are not in use:
lsof -i :3000,8081,8082,8083,8090 - See detailed troubleshooting: FRONTEND_INTEGRATION_ISSUES.md
Happy Coding! π