A comprehensive Spring Boot backend system for a career growth platform that connects professionals with mentors and communities.
- Authentication & Authorization: JWT-based secure authentication system
- Community Management: Create and join communities
- Mentorship Platform: Connect with mentors and book sessions
- Session Booking: Schedule and manage mentorship sessions
- Google Calendar Integration: Seamless calendar synchronization
- Social Features: Posts, comments, and likes system
- File Management: Cloudinary integration for file uploads
- Notification System: Real-time notifications for users
- Admin Dashboard: Administrative controls and mentor application management
- Profile Management: Comprehensive user profile system
- Framework: Spring Boot 3.x
- Security: Spring Security with JWT
- Database: PostgreSQL (Supabase)
- File Storage: Cloudinary
- Email Service: JavaMail
- Calendar Integration: Google Calendar API
- Build Tool: Maven
- Authentication: JWT tokens
- Java 17 or higher
- Maven 3.6+
- PostgreSQL database
- Cloudinary account
- Google Calendar API credentials
- SMTP server for email notifications
Create an application.properties file with the following configurations:
# Database Configuration
spring.datasource.url=jdbc:postgresql://your-supabase-url:5432/your-database
spring.datasource.username=your-username
spring.datasource.password=your-password
# JWT Configuration
jwt.secret=your-jwt-secret-key
jwt.expiration=86400000
# Cloudinary Configuration
cloudinary.cloud-name=your-cloud-name
cloudinary.api-key=your-api-key
cloudinary.api-secret=your-api-secret
# Email Configuration
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username[email protected]
spring.mail.password=your-app-password
# Google Calendar API
google.calendar.credentials.file.path=path/to/credentials.json-
Clone the repository
git clone https://github.com/your-username/momentum-backend.git cd momentum-backend -
Configure environment variables
- Copy
application.properties.exampletoapplication.properties - Fill in your configuration values
- Copy
-
Install dependencies
mvn clean install
-
Run the application
mvn spring-boot:run
The application will start on http://localhost:8080
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/verify- Verify user emailGET /api/auth/test- Test CORS configuration
POST /api/community/create- Create new communityGET /api/community/{id}- Get community by IDGET /api/community/all- Get all communitiesGET /api/community/my-communities- Get communities owned by userGET /api/community/joined- Get communities joined by userPUT /api/community/{id}- Update communityDELETE /api/community/{id}- Delete communityPOST /api/community/{id}/join- Join communityPOST /api/community/{id}/leave- Leave communityGET /api/community/search- Search communities
POST /api/post/regular/create/{id}- Create regular postPOST /api/post/project/create/{id}- Create project postPUT /api/post/regular/{id}- Update regular postPUT /api/post/project/{id}- Update project postDELETE /api/post/{id}- Delete postGET /api/post/community/{id}- Get posts by communityGET /api/post/my/feed- Get user's feedGET /api/post/{id}- Get post by IDPOST /api/post/{id}/like- Like postDELETE /api/post/{id}/like- Unlike postGET /api/post/{id}/likes- Get post likesGET /api/post/{id}/comments- Get post commentsGET /api/post/my- Get user's posts
POST /api/comments/post/{postId}- Add comment to postPUT /api/comments/{commentId}- Update commentDELETE /api/comments/{commentId}- Delete commentPOST /api/comments/{commentId}/like- Like commentDELETE /api/comments/{commentId}/like- Unlike commentGET /api/comments/{commentId}/likes- Get comment likes
GET /api/profile/me- Get current user profilePATCH /api/profile/me- Update current user profilePOST /api/profile/me/avatar- Upload avatarGET /api/profile/{profileId}- Get user profile by IDGET /api/profile/learners- Get all learnersGET /api/profile/mentors- Get all mentorsGET /api/profile/top-rated- Get top-rated mentorsPOST /api/profile/{profileId}/follow- Follow userDELETE /api/profile/{profileId}/unfollow- Unfollow userGET /api/profile/followers- Get followersGET /api/profile/following- Get following
GET /api/mentors/search- Search mentors with filters
POST /api/bookings/{mentorId}- Create booking with mentorGET /api/bookings/mentor- Get mentor's bookingsGET /api/bookings/learner- Get learner's bookingsDELETE /api/bookings/cancel/{bookingId}- Cancel bookingPOST /api/bookings/{bookingId}/rate- Rate completed sessionGET /api/bookings/status/{bookingId}- Get booking status
POST /api/availability/add- Add mentor availabilityGET /api/availability/{mentorId}- Get mentor availabilityPUT /api/availability/{availabilityId}/cancel- Cancel availability
GET /api/application/status- Get application statusPOST /api/application/{appId}/approve- Approve application (admin)POST /api/application/{appId}/reject- Reject application (admin)GET /api/application- Get applications by status (admin)GET /api/application/{appId}- Get application by ID
GET /api/notifications- Get user notifications (paginated)GET /api/notifications/unread- Get unread notificationsGET /api/notifications/unread/count- Get unread countPUT /api/notifications/{id}/read- Mark notification as readPUT /api/notifications/read-all- Mark all notifications as read
GET /api/countries- Get all countriesPOST /api/countries- Add countryPUT /api/countries/{id}- Update countryDELETE /api/countries/{id}- Delete countryGET /api/cities/{countryName}- Get cities by countryPOST /api/cities- Add cityPUT /api/cities/{id}- Update cityDELETE /api/cities/{id}- Delete city
GET /api/job-titles- Get all job titlesPOST /api/job-titles- Add job titlePUT /api/job-titles/{id}- Update job titleDELETE /api/job-titles/{id}- Delete job titleGET /api/tags- Get all tagsPOST /api/tags- Create tagPUT /api/tags/{id}- Update tagDELETE /api/tags/{id}- Delete tagGET /api/universities- Get all universitiesPOST /api/universities- Add universityPUT /api/universities/{id}- Update universityDELETE /api/universities/{id}- Delete university
GET /api/statistics- Get platform statistics
src/
βββ main/
β βββ java/
β β βββ com/momentum/
β β βββ config/ # Configuration classes
β β βββ controller/ # REST controllers
β β βββ dto/ # Data Transfer Objects
β β βββ entity/ # JPA entities
β β βββ repository/ # Data repositories
β β βββ service/ # Business logic
β β βββ security/ # Security configuration
β βββ resources/
β βββ application.properties
β βββ static/
βββ test/ # Test files
mvn testmvn clean package- Follow Java naming conventions
- Use meaningful variable and method names
- Add appropriate comments for complex logic
- Maintain consistent indentation
FROM openjdk:17-jdk-slim
COPY target/momentum-backend-*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app.jar"]export DATABASE_URL=your-production-db-url
export JWT_SECRET=your-production-jwt-secret
export CLOUDINARY_URL=your-cloudinary-url- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
-
Daniel Sameh - Team Leader & Scrum Master
- Authentication system
- Community management
- Posts and social features
- Session booking system
-
Mohamed Mahmoud - Backend Developer
- Notification system
- Profile management
- Mentor application system
-
Toqa Ashraf - Full-Stack Developer
- Admin functionality
- Mentor application management
- User Statistics
- Frontend integration
-
Raghad Ahmad - Testing & QA Engineer
- Testing and quality assurance
- Bug tracking and resolution
This project is licensed under the MIT License - see the LICENSE file for details.