Week 10 Worklog

Week 10 Objectives:

  • Develop core backend APIs with Spring Boot
  • Implement database models and repositories
  • Set up JWT authentication
  • Deploy backend to EC2

Tasks to be carried out this week:

DayTaskStart DateCompletion DateReference Material
1-3- Design database schema (ERD)
- Create JPA entities and repositories
- Implement user authentication APIs
  + Register, Login, Logout
  + JWT token generation
2025/11/102025/11/12Spring Boot JPA docs
4-5- Develop blood donation APIs
  + Create donation request
  + Search donors by blood type
  + Update donation status
- Test APIs with Postman
2025/11/132025/11/14REST API best practices
6-7- Build JAR file with Maven
- Deploy backend to EC2
  + Upload JAR to S3
  + Configure EC2 with Java
  + Run Spring Boot application
- Test deployed APIs
2025/11/152025/11/16AWS EC2, S3 docs

Week 10 Achievements:

  • Backend Development:

    • Designed database schema with 5 main tables: Users, BloodDonations, Donors, Hospitals, DonationHistory
    • Created JPA entities with relationships (OneToMany, ManyToOne)
    • Implemented Spring Data JPA repositories
    • Built authentication system with JWT tokens
    • Developed RESTful APIs for user management and blood donations
  • API Implementation:

    • User APIs: Register, Login, Get Profile, Update Profile
    • Donation APIs: Create Request, Search Donors, Update Status, Get History
    • Implemented proper error handling and validation
    • Tested all endpoints with Postman
  • Backend Deployment:

    • Built JAR file using Maven: mvn clean package
    • Uploaded JAR to S3 bucket for artifact storage
    • Configured EC2 instance with Java 17
    • Deployed Spring Boot application on EC2
    • Configured application.properties with RDS connection
    • Verified APIs working on EC2

Challenges Encountered:

  • JPA Relationships: Circular dependency issues → Used @JsonIgnore and DTOs
  • JWT Implementation: Token expiration handling → Implemented refresh token mechanism
  • EC2 Deployment: Port 8080 not accessible → Configured Security Group inbound rules

Key Learnings:

  • Mastered Spring Boot REST API development
  • Understood JPA entity relationships and lazy loading
  • Learned EC2 deployment process for Java applications

References: