Backend Part of the Implementation Milestone Report - bounswe/bounswe2025group8 GitHub Wiki
4. Backend Implementation
4.1 Technology Selection Process
At the beginning of our project, we evaluated several key technology choices to build a foundation that would support all three teams (backend, frontend, and mobile) effectively:
-
Container Strategy: We decided to use Docker from the outset (Issue #98: Research and Determine Docker Environment) to provide consistent development environments. This decision significantly reduced dependency issues and simplified setup for all team members.
-
Backend Framework: The course allowed us to choose between Spring and Django. After team discussion, we selected Django for its rapid development capabilities and excellent integration with Python-based data processing (Issue #95: Determine Backend Tech Stack).
-
Database Selection: Between MySQL and PostgreSQL, we selected PostgreSQL for its robust handling of complex relationships and JSON data types, which aligned well with our application requirements.
Initially, we expected to write raw SQL to create database tables, but we discovered the power of Django's ORM (Object-Relational Mapping). This significantly simplified our database work and accelerated development.
4.2 Team Organization and Collaborative Approach
Our project team was divided into three specialized groups: backend, frontend, and mobile. The backend team consisted of 4 members working together to implement the core application logic and API endpoints.
Collaborative API Design Process
We implemented an innovative approach to API endpoint design that involved the entire team:
- Each of our 11 team members was responsible for designing the API endpoint related to their scenario (Issues #120-#129)
- This included specifying inputs, outputs, and workflow logic
- The 4-person backend team then implemented these endpoints based on the provided specifications
This approach ensured that everyone understood the API structure, while leveraging the specialized skills of the backend team for implementation. It also distributed workload effectively and created a sense of ownership across the entire team.
Backend Team Structure
We organized our backend implementation work around key functional areas:
- Core Models: Initial implementation of domain models based on our class diagram (Issue #113: Implement Classes Based on UML Class Diagram)
- Database Setup and Configuration: Setting up PostgreSQL and managing migrations (Issue #112: DB Initial Implementation)
- API Implementation: Distributed individual endpoints among team members (Issues #147-#153: API Implementation Tasks)
- Testing and Documentation: Creating comprehensive Postman collections (Issues #165-#173: Create Postman Tests)
4.3 Development Standards and Workflow
To maintain consistency in our development process, we established several standards:
Code Organization
We organized our Django project following a modular architecture described in our API Implementation Architecture and Standards issue and documentation:
- Core models in
models/
directory with one file per model class - API serializers and views in corresponding
api/serializers/
andapi/views/
directories - Test files following a consistent naming pattern
Branch Naming and Commit Strategy
We adhered to specific branch naming conventions as documented in our branch naming standards:
- Format:
name/field/topic
(e.g.,tom/backend/user-model
)
For commit messages, we followed Conventional Commits to maintain a clean, meaningful Git history:
- Format:
type(scope): message
(e.g.,feat(user): add password reset functionality
)
Development Coordination
Regular backend team meetings (Issue #132: Backend Team Meeting 2) helped us coordinate our efforts and address challenges collectively.
4.4 Challenges and Solutions
Challenge 1: Docker Configuration Issues
Challenge: We encountered Docker Compose issues related to database migrations, which complicated our setup process.
Solution: We diagnosed the issues and resolved them by manually adding migrations and improving our Docker configuration (Issue #163: Fix the Backend Docker Issues). This ensured a smooth environment setup for all team members.
Challenge 2: API Testing and Validation
Challenge: Ensuring our API implementations met the specifications provided by team members.
Solution: We created comprehensive Postman test collections (Issues #165-#173) to validate our API implementation. This testing process revealed several bugs that we fixed before integrating with frontend and mobile teams.
Challenge 3: Cross-Team Integration
Challenge: Ensuring the backend API could be easily consumed by frontend and mobile teams.
Solution: After validating our API through Postman tests, we provided clear documentation and Docker setup instructions to frontend and mobile teams. This facilitated smooth integration and reduced cross-team dependencies. API Documentation
4.5 Knowledge Transfer
Once our API endpoints were successfully tested, we conducted knowledge transfer sessions with the frontend and mobile teams. We explained how to:
- Use the Docker Compose setup to run the backend locally
- Access API documentation
- Make requests to our endpoints
This collaborative approach ensured that all teams had the knowledge needed to integrate with the backend effectively.
4.6 Lessons Learned
-
Docker simplifies cross-team collaboration: Starting with containerization from day one significantly reduced "works on my machine" problems.
-
Django's ORM is powerful: What we initially thought would require complex SQL became much simpler through Django's ORM.
-
Distributed API design works well: Having each team member design an endpoint created better understanding across the entire team.
-
Automated testing is critical: Our Postman collections proved invaluable for validating functionality before integration.
Our backend implementation artifacts can be found in the project repository: