Explain why backend is considered more than “just a server.” Use Osisi to illustrate what could go wrong without a solid backend.
Backend is the logic, data, and infrastructure that powers functionality. Without it, apps suffer from security holes, data inconsistencies, poor performance, and bad developer experience. In Osisi, a weak backend could mean family data leaks, duplicate relatives, or failed real-time sync between members.
List the three pillars of backend development and explain how each applies to Osisi.
Data Management – storing family trees, members, and relationships.
Business Logic – enforcing rules (e.g., no one can be their own parent).
Security & Authentication – verifying users before granting access to sensitive family data.
In Osisi, one user owns many families, and one family has many members. How would you design this schema to avoid duplication and ensure efficient queries?
Normalization: Store each family member once, reference them in relationships.
Relationships & Indexes: Use foreign keys (family_id) and indexes for fast queries.
Validation: Enforce constraints (valid email, max name length).
APIs are called the “contract” between frontend and backend. What makes a good API in Osisi?
Clear Endpoints: e.g., createFamily(), getFamilyMembers().
Defined Input Parameters: e.g., createFamily(name, owner_id, is_public).
Consistent Return Values: e.g., getFamilyMembers returns array of member objects.
Error Handling: Return meaningful messages when input is invalid.
Give two examples of business logic rules in Osisi and explain why they are critical.
Data Integrity Rule: A person cannot be their own parent → prevents corrupted family trees.
Cascading Operation: Deleting a member removes their relationships → ensures consistency.
Differentiate authentication and authorization in Osisi. Provide examples of roles.
Authentication: Verifying identity (login with email/password).
Authorization: Determining permissions.
Owner: full CRUD.
Editor: add/edit members.
Viewer: read-only.
Limited: restricted view.
Validation happens at multiple levels. Apply each type to Osisi.
Type Validation: Ensure age is a number.
Format Validation: Email must match valid format.
Business Rules Validation: No duplicate family names.
Existence Validation: Family must exist before adding members.
How would you optimize queries in Osisi when retrieving members of a large family tree?
Use indexes on family_id.
Apply selective queries (fetch only needed fields).
Implement pagination (load members in chunks).
Osisi suddenly grows to 1 million users. What backend strategies ensure scalability?
Caching: Store frequently accessed family data in memory.
Database Optimization: Proper indexes and query design.
Async Operations: Offload long-running tasks (e.g., matching relatives).
Rate Limiting: Prevent abuse of APIs.
Provide examples of four error types in Osisi and how backend should respond.
Validation Error: “Family name must be 2–100 characters.”
Authorization Error: “You don’t have permission to delete this family.”
Server Error: “Something went wrong. Please try again later.”
Not Found Error: “Family not found or has been deleted.”
Differentiate unit, integration, and edge case testing in Osisi.
Unit Test: Test createFamilyMember() validates name length.
Integration Test: Add member → create relationship → query descendants.
Edge Case Test: Handle circular relationships or empty families.
Imagine you are the backend architect for Osisi. Write a short design proposal covering:
Data modeling principles
API design
Business logic rules
Authentication/authorization strategy
Scalability considerations
Normalize entities (users, families, members, relationships).
APIs with clear endpoints, parameters, return values.
Business logic: enforce integrity, cascade deletes, workflows for collaboration.
Auth: role-based access (owner, editor, viewer, limited).
Scalability: caching, async operations, rate limiting.