How dsquare-io/splinter works
Main System Components
a) Frontend Layer:
• React-based UI (evidenced by the /ui directory with TypeScript and React components)
• Frontend modules:
• Authentication views
• Dashboard components
• Expense management
• Management
• Activity tracking
b) Backend Layer (Django-based):
• Core Apps:
• User Management (/apps/user)
• Authentication (/apps/authn)
• Expense Management (/apps/expense)
• Management (/apps/group)
• Friend Management (/apps/friend)
• Currency Management (/apps/currency)
• Activity Tracking (/apps/activity)
• Multi-factor Authentication (/apps/mfa)
c) Infrastructure Layer:
• Database (indicated by Django models and migrations)
• Celery for async tasks (celery_app.py)
• Cache system (settings/cache.py)
• Email service (settings/email.py)
Relationships and Data Flow
• API interactions between frontend and backend
• Database operations
• Authentication flow
• Expense splitting calculations
• Activity logging flow
• Currency conversion paths
Architectural Patterns to Highlight
• Django's MVT (Model-View-Template) pattern
• REST API architecture (evidenced by serializers and views)
• Component-based frontend architecture
• Service-oriented backend structure (each app as a service)
Technical Implementation Details
• Blue rectangles: Frontend components
• Green rectangles: Backend services
• Yellow diamonds: External services
• Red hexagons: Security components
Specific Elements
a) Frontend Section:
• Route structure (/ui/src/routes)
• Component hierarchy (/ui/src/components)
• State management (React Query indicated by useApiQuery)
• API integration layer
b) Backend Section:
• Django apps architecture
• Authentication flow
• Database models
• API endpoints
• Task queue system
c) Infrastructure Section:
• Docker containers
• Database
• Caching layer
• Task queue
• Email service