This guide will help you get the SkillSwap application running on your local machine in minutes.
Choose the option that works best for you:
-
Option 1 (Recommended): Database in Docker, App runs locally
- ✅ Fast development with hot-reload
- ✅ Easy to debug
- ✅ No Docker image rebuilds needed
-
Option 2: Everything in Docker
- ✅ Production-like environment
- ✅ Consistent across all machines
⚠️ Slower for development (requires rebuilds)
Make sure you have:
- ✅ Java 21 installed (
java -version) - ✅ Docker Desktop running
- ✅ Maven (or use
mvnw.cmdincluded in project)
Open PowerShell/Command Prompt in the project directory and run:
docker-compose up -d dbWhat this does:
- Starts PostgreSQL database in a Docker container
- Database will be available at
localhost:5432 - Creates database
skillswapautomatically - Runs schema initialization on first startup
Verify it's running:
docker ps
# You should see: skillswap-dbIn the same terminal (or a new one), run:
.\mvnw.cmd spring-boot:runWhat this does:
- Compiles the Java code
- Starts the Spring Boot application
- Connects to the database
- Serves the frontend and API
Wait for this message:
Started SkillswapApplication
Open your browser and go to:
- Homepage: http://localhost:8080
- Discover Page: http://localhost:8080/discover.html
- Profile Page: http://localhost:8080/profile.html
- Stop Spring Boot: Press
Ctrl + Cin the terminal - Stop Database (optional):
docker stop skillswap-db
Make sure you have:
- ✅ Docker Desktop running
docker-compose up --buildWhat this does:
- Builds the Spring Boot application Docker image
- Starts PostgreSQL database
- Starts Redis
- Starts MailHog (email testing)
- Starts the Spring Boot application
Wait for all services to start (this may take a few minutes the first time)
Open your browser and go to:
- Application: http://localhost:8080
- MailHog UI: http://localhost:8025 (for testing emails)
# Stop all containers
docker-compose down
# Stop and remove volumes (⚠️ This deletes database data)
docker-compose down -v-
Start Docker Desktop (if not already running)
-
Start the database:
docker start skillswap-db # Or if it's not running: docker-compose up -d db
-
Run the application:
.\mvnw.cmd spring-boot:run
-
Open browser: http://localhost:8080
- Frontend changes: Just refresh your browser (no rebuild needed)
- Backend changes: Spring Boot DevTools will auto-reload
- Database changes: May require restart
- Stop Spring Boot: Press
Ctrl + C - Stop database (optional):
docker stop skillswap-db
After starting the application:
-
Register a user:
- Go to http://localhost:8080/register.html
- Fill in the form and submit
-
Login:
- Go to http://localhost:8080/login.html
- Enter your email (password not verified yet)
-
Create profile:
- Go to http://localhost:8080/profile.html
- Fill in your information and save
-
Discover users:
- Go to http://localhost:8080/discover.html
- Browse and swipe on profiles
Solution:
# Find what's using port 8080
netstat -ano | findstr :8080
# Kill the process (replace <PID> with the number from above)
taskkill /PID <PID> /FSolution:
# Check if database is running
docker ps
# If not, start it
docker-compose up -d db
# Check database logs
docker logs skillswap-dbSolution:
# Clean and rebuild
.\mvnw.cmd clean compile
# Then run again
.\mvnw.cmd spring-boot:runSolution: Make sure you're logged in first:
- Go to http://localhost:8080/login.html
- Enter your email
- Then try saving your profile
docker start skillswap-db # Start database
docker stop skillswap-db # Stop database
docker ps # List running containers
docker logs skillswap-db # View database logs
docker exec -it skillswap-db psql -U postgres -d skillswap # Access database CLI.\mvnw.cmd clean compile # Clean and compile
.\mvnw.cmd spring-boot:run # Run application
.\mvnw.cmd clean spring-boot:run # Clean, compile, and rundocker-compose up -d db # Start only database
docker-compose up --build # Build and start all services
docker-compose down # Stop all services
docker-compose down -v # Stop and remove volumes (⚠️ deletes data)- Check the full README.md for detailed information
- Check TROUBLESHOOTING.md for detailed troubleshooting guides
- Check FRONTEND.md for frontend-specific documentation
- Check console/terminal for error messages
- Verify prerequisites are installed correctly
- Ensure Docker Desktop is running
- Try cleaning and rebuilding:
.\mvnw.cmd clean compile
- Java 21 installed (
java -version) - Docker Desktop installed and running
- Cloned the repository
- Started database:
docker-compose up -d db - Ran application:
.\mvnw.cmd spring-boot:run - Opened http://localhost:8080 in browser
- Successfully registered a test user
- Successfully logged in
- Created a profile
You're all set! 🎉
Questions? Check the main README.md or ask your team lead.