How pradhuman0508/splitwise-frontend works
Project type and purpose
• This is a Single-Page Application (SPA) built with Angular (v18.2.12) that uses Angular Universal for server-side rendering (SSR).
• It’s named “SplitwiseFrontend” and implements the UI, routing, and business logic for an expense-splitting tool.
• Firebase is used for authentication and data storage.
File structure
• Top-level artifacts:
• angular.json, tsconfig*.json – Angular CLI configuration
• package.json – dependencies and scripts
• server.ts – Node/Express entry point for SSR
• public/ – static assets served by the server
• src/ folder:
• main.ts – client bootstrap of Angular app
• main.server.ts + app.module.server.ts – server-side bootstrap modules
• app/ – core Angular code
– app.module.ts – root NgModule for browser
– app-routing.module.ts – route definitions (landing, login, register, dashboard)
– guards/ – route guards (auth.guard.ts)
– pages/ – feature modules with components per page
– services/ – injectable services (auth.service.ts, firebase.service.ts)
• environments/ – environment-specific configuration
• assets/ – SCSS theming, layout, demo code, images, flags
• styles.*, tailwind.config.js – global styling via SCSS and Tailwind CSS
README for additional insights
• Confirms reliance on ng serve, ng build, Karma tests, etc.
• Implies developer-centric setup; no custom microservices beyond Firebase.
a. Main components to represent:
• Client Browser (requests pages, executes client bundle)
• Node/Express SSR Server (server.ts)
• Angular Application
– Browser Module (main.ts → app.module.ts)
– Server Module (main.server.ts → app.module.server.ts)
• Firebase (Auth, Firestore/Realtime Database)
• Static Asset Store / CDN (public/, assets/)
b. Relationships and interactions:
• Browser → HTTP GET → SSR Server → Angular Universal renders HTML → Browser
• Browser → serves client bundle (JavaScript, CSS) → executes Angular client
• Angular services (auth.service, firebase.service) ↔ Firebase SDK
• Guards/router coordinate navigation within client
• Build pipeline (Angular CLI) generates server & browser bundles
c. Architectural patterns and design principles:
• Component-based UI (Angular Components under pages/)
• Module separation (AppModule vs AppModuleServer) for SSR
• Dependency Injection for services and guards
• Route Guards handle protected routes (AuthGuard)
• Style theming via SCSS and Tailwind
d. Key technologies/frameworks:
• Angular (CLI, Universal)
• Node.js + Express (in server.ts)
• Firebase (Auth, Firestore)
• TypeScript, SCSS, Tailwind CSS