How poveroh/poveroh works
Overall Project Type & Purpose
• Poveroh is a full-stack web application combining a modern frontend (Next.js with TailwindCSS) and a backend API (Node.js with Express) to manage personal finance tracking. It aggregates multiple bank accounts, handles transactions (manual and file uploads), and in the future will expand to include investments and additional features.
• The project utilizes a microservice-like structure with clearly separated apps (API, web application, CDN) and shared packages (e.g., Prisma for DB, UI library, shared TS configs/types).
File Structure
• Top-level directories like “apps/api” and “apps/app” clearly separate the backend from the frontend.
• apps/api – Contains Express controllers, routes, middleware, and utility functions. This is the RESTful backend that handles business logic and database interactions.
• apps/app – This is built with Next.js, containing various routes (admin, auth, etc.), React components, and styling (Tailwind) targeting the frontend experience.
• apps/cdn – Contains Docker and NGINX configuration files that hint at serving static assets and potentially acting as a reverse proxy.
• Other directories include “packages/prisma” (for DB schema, migrations and Prisma integration with PostgreSQL), “packages/ui” (shared UI components), and “packages/types” (TypeScript type definitions, ensuring consistency across modules).
• Review of configuration files (tsconfig, docker-compose, Dockerfiles) indicates containerized deployment and rigorous build setups.
a. Main Components to Represent:
• Frontend Layer:
• Next.js Web Application (apps/app) with dedicated routes for admin, authentication, dashboards, etc.
• Storybook (apps/storybook) for UI component testing and documentation.
• Shared UI components from the “packages/ui” package.
• Backend API:
• Node.js & Express API server (apps/api) managing routes, controllers (auth, bank accounts, users, status), middlewares, and utilities.
• Utilizes shared types and business logic across packages.
• Database Layer:
• PostgreSQL as the primary datastore.
• Prisma integration (packages/prisma) for schema management, client generation, and migrations.
• Infrastructure & CDN:
• CDN Service (apps/cdn) configured via Docker and NGINX to serve static content or cache assets.
• Docker Compose setup (docker-compose.yml) orchestrating the various service containers.
• Supporting Utilities:
• Shared utility modules (in packages/utils).
• Configuration and environment management files in each app.
b. Relationships & Data Flow:
• The Frontend (Next.js) communicates with the Backend API using HTTP calls (using defined routes like /auth, /bankaccount, etc.).
• The Backend API uses Prisma to interact with the PostgreSQL database.
• Docker containers and Docker Compose files reflect deployment orchestration, meaning each component (backend, frontend, CDN, DB) is containerized and managed within an integrated ecosystem.
• The CDN (NGINX) acts as a static resource/service proxy which may route certain requests or cache assets.
c. Architectural Patterns & Technologies:
• Separation of Concerns: Clear division between frontend (UI/React), backend (API/Express), and database layers.
• Modular Architecture: Use of packages for shared configurations (tsconfig), UI components, types, and utilities promotes reusability.
• Containerization: Dockerfiles and docker-compose orchestrate local development and deployment, ensuring environment consistency.
• API Gateway / Reverse Proxy: The NGINX configuration hints at a reverse proxy in front of the application layers.
• Modern Web Technologies: Leveraging Next.js for SSR/SSG, TailwindCSS for styling, and Prisma for ORM.
• Mention shared and reusable modules from “packages/*” as auxiliary layers supporting both frontend and backend components.
• With the related tech stacks where needed (e.g., “Node.js & Express”, “Next.js & TailwindCSS”, “Prisma ORM”, “PostgreSQL”).