Architecture document sample
Architecture document sample
Application Architecture
You have to choose one of the following architectures and explain how your project follows that
model:
1. Microservices Architecture
○ The application is split into small, independent services (e.g., an issue-reporting
service, a volunteer-matching service).
○ Each service runs separately and communicates using APIs.
○ Example: Uber’s system has separate services for ride requests, payments, and
maps.
2. Event-Driven Architecture
○ The system reacts to events (e.g., when a user reports an issue, a notification is
sent to volunteers).
○ Components communicate using event messages (like a chat system where a
new message appears in real-time).
○ Example: WhatsApp notifications when a new message arrives.
3. Serverless Architecture
○ The backend runs on cloud-based functions that execute when needed.
○ No need to manage servers; the system scales automatically.
○ Example: When a user submits an issue, a cloud function processes and stores
it.
4. Monolithic Architecture
○ The entire application is built as a single unit (everything runs together in one big
codebase).
○ Easier to develop but harder to scale.
○ Example: A simple blog website where everything (login, posts, comments) is in
one big system.
Diagrams to Include:
● Use Case Diagram: Shows different users (citizens, volunteers, admins) and what
actions they can perform.
● Class Diagram: Defines system objects (Issue, User, Volunteer) and their relationships.
● Data Flow Diagram (DFD): Shows how data moves (e.g., how an issue report is
processed).
● Component Diagram: Displays different system modules and their connections.
● Sequence Diagram: Shows the step-by-step flow of an action (e.g., issue reporting
process).
● Deployment Diagram: Explains where and how the system runs (e.g., on AWS, local
servers).
2. Database
2.1 ER Diagram (Entity-Relationship Diagram)
The ER Diagram represents how different entities (tables) in the database interact with each
other. Here are the key entities and their relationships:
Entity Relationships:
1. One User → Can report multiple issues (1:N).
2. One Issue → Can be assigned to one or more volunteers (N:M).
3. One User → Can file multiple complaints (1:N).
4. One Volunteer → Can receive multiple rewards (1:N).
3. Data Exchange Contract
Describes how different system parts communicate and share data.
Final Steps:
● Choose the architecture that best fits your Next Step project.
● Create the required diagrams to explain how the system works.
● Define how data is stored and shared between different parts of the system.
● Real-time:
○ User registration & authentication
○ Issue reporting & updates
○ Complaint filing & tracking
○ Reward allocation updates
○ User comments on issues
● Scheduled (Periodic):
○ Leaderboard updates (e.g., every 24 hours)
○ Summary reports for authorities (e.g., daily or weekly reports on complaints and
issues)
● Event-Triggered:
○ Notifications (when a volunteer picks up an issue or a complaint status is
updated)
○ Status changes (e.g., issue resolved, complaint escalated)
2. Data Sets
The platform handles multiple types of structured data sets:
Users
● User ID
● Name
● Email
● Phone Number
● Role (User, Volunteer, Authority)
● Location
● Skills (for volunteers)
● Rewards Earned
Issues
● Issue ID
● User ID (Reporter)
● Title
● Description
● Category (Road, Pipeline, Electrical, etc.)
● Location
● Status (Pending, In Progress, Resolved)
● Assigned Volunteer(s)
● Created At
● Updated At
Complaints
● Complaint ID
● User ID (Complainant)
● Title
● Description
● Category (Cybercrime, Theft, Police, Government)
● Assigned Authority
● Status (Submitted, Under Review, Resolved)
● Created At
● Updated At
Rewards
● Reward ID
● Volunteer ID
● Points Earned
● Reward Level (Gold, Silver, Bronze)
● Issued Date
Leaderboard
● User ID
● Points
● Rank
● Last Updated
3. Mode of Exchanges
3.1 API-Based Exchanges (Primary Mode)
APIs will be used for most interactions in a microservices-based architecture:
Endpoints Examples:
Example Events: