How teamshiksha/openlogo works
1. This is a two-package monorepo: packages/ui is the React frontend, and packages/app is the Node/Express backend API. The root also contains shared repo tooling, GitHub Actions, Docker Compose, and documentation.
2. The frontend is a Vite-built React SPA. Its structure is page/component driven, with route-level screens under src/page, reusable UI under src/components, and cross-cutting state in src/contexts and src/hooks. A small API client layer (src/api) and route protection helpers (ProtectedRoute) connect the UI to the backend.
3. The backend is organized in the classic layered Express style: routes define HTTP endpoints, controllers handle request/response orchestration, services implement business logic, repositories isolate persistence access, and models map to MongoDB collections. This separation is the main backend architectural boundary.
4. Authentication and account management are a major subsystem. The backend includes signup/signin/signout, email verification, MFA, password reset, session validation, user profiles, and API key management. Related models such as userSession, verificationSession, and usertoken show that identity state is persisted server-side rather than being purely stateless.
5. The core product domain is logo discovery and logo catalog management. Backend routes/controllers for logo and catalog support logo search, fetching individual logos, generating presigned upload URLs, updating metadata/permissions, and analytics. The UI mirrors this with logo upload, catalog browsing, and dashboard components.
6. There is a separate “logo request” workflow for user-submitted requests. It spans request creation, request logs, and operator tooling, with dedicated controllers and UI dashboards. The presence of operator routes, operator dashboard components, and message/request handlers indicates a human-in-the-loop review/support flow.
7. User-facing operational features include contact-us handling, subscriptions/plans, usage tracking, and personal data actions. The backend has services and models for subscriptions, request counts, keys, and user-related utilities; the frontend exposes current plan, usage graphs, settings, and account management screens.
8. Storage is MongoDB-centric. The backend’s models/repositories imply distinct collections for users, sessions, requests, images, contact messages, logo request logs, subscriptions, and keys. Business logic sits above the database via repositories so controllers do not talk to persistence directly.
9. External integrations matter to the architecture: AWS is used for the backend infrastructure and logo asset handling, including presigned upload flows and CloudFront-related utilities. Email delivery is also a first-class integration, supporting verification and password reset flows. The repo includes CloudFormation templates for dev/test and prod, suggesting infrastructure as code.
10. Deployment is split between frontend and backend, with separate GitHub Actions workflows and vercel.json files. The frontend is Vercel-friendly, while the backend is containerized with Docker and also has AWS deployment support. The repo also includes a daily refresh script for usage counts and Postman collections for API verification, which are part of the operational surface of the system.
11. Testing is broad and mirrors the architecture: backend Jest tests cover controllers, services, scripts, and utilities; frontend Vitest/Jest tests cover components, pages, contexts, and hooks. This suggests the team validates both API behavior and UI behavior at the subsystem boundary level.
12. In diagram terms, the main flows are: browser UI → Express routes/controllers → services → repositories/models → MongoDB/AWS; and operator/admin flows reuse the same backend layers but expose separate UI screens and endpoints. The repo is centered on a logo platform with auth, catalog, requests, and admin workflows layered over shared persistence and cloud services.
Main entry points: services Services · App.jsx UI app · page Pages · server.js API app
Components 21
Repo tooling
Shared repository automation, documentation, and deployment plumbing.
- Repo ops · GitHub Actions, Docker Compose, docs, and workspace setup.
- Docs · Development docs, diagrams, and Postman collections.
docs
Frontend
Vite-built React SPA in packages/ui.
- UI app · Frontend application shell and router bootstrap.
packages/ui/src/App.jsx - Pages · Route-level screens for home, dashboard, create logo, docs, release, and verification.
packages/ui/src/page - Components · Reusable UI building blocks for auth, catalog, logo editing, operator, usage, and settings.
packages/ui/src/components - State · Cross-cutting React contexts and custom hooks for auth, operator, theme, toast, and API access.
packages/ui/src/contexts - API client · Frontend API instance and route protection helpers connecting the SPA to the backend.
packages/ui/src/api - Logo tools · Upload, canvas, toolbar, and file-operation UI for logo creation and editing.
packages/ui/src/components/logo - Catalog UI · Browsing, image upload modal, and catalog item presentation.
packages/ui/src/components/catalog - Admin UI · Operator dashboard and review/support surfaces for requests and messages.
packages/ui/src/components/operator - Account UI · Signin, signup, reset password, verification, profile, plan, usage, and settings screens.
packages/ui/src/components/auth
Backend
Express API in packages/app.
- API app · Backend application bootstrap and server wiring.
packages/app/server.js - Routes · HTTP endpoint definitions for auth, catalog, logo, requests, users, operator, and logs.
packages/app/routes - Controllers · Request/response orchestration layer separating transport from business logic.
packages/app/controllers - Services · Core workflows for auth, MFA, password reset, requests, subscriptions, email, and asset handling.
packages/app/services - Repositories · Data-access boundary over MongoDB collections.
packages/app/repositories - Models · Collection schemas and persistence models for users, sessions, requests, images, subscriptions, and keys.
packages/app/models - Identity · Signup, signin, verification, MFA, sessions, reset password, API keys, and account utilities.
packages/app/routes/auth.js - Catalog · Logo search, single-logo fetch, presigned uploads, metadata updates, permissions, and analytics.
packages/app/routes/catalog.js - Requests · User logo requests, request logs, operator tooling, and message handling.
packages/app/routes/createLogoRequest.js - AWS · CloudFront, presigned upload support, and CloudFormation deployment templates.
packages/app/aws
Connections 21
- Repo ops → Docs: documents · Repo-level docs and collections describe usage and APIs.
- Repo ops → UI app: deploys · Frontend is built and deployed as a separate surface.
- Repo ops → API app: deploys · Backend has its own container and deployment workflow.
- UI app → Pages: renders · Application shell routes to page-level screens.
- UI app → Components: composes · Pages and shared screens are built from reusable components.
- UI app → State: uses · Contexts and hooks provide app-wide state and behavior.
- UI app → API client: calls · SPA reaches the backend through the API client layer.
- Pages → Account UI: includes · Account-related screens and settings live in the route layer.
- Pages → Catalog UI: includes · Catalog browsing and upload flows are page driven.
- Pages → Admin UI: includes · Operator dashboard screens support request handling.
- Pages → Logo tools: includes · Create-logo screens use the logo editing toolset.
- API app → Routes: mounts · Server wires route modules into the HTTP app.
- Routes → Controllers: dispatches · Routes delegate endpoint handling to controllers.
- Controllers → Services: orchestrates · Controllers call services for business workflows.
- Services → Repositories: reads/writes · Services access persistence through repositories.
- Repositories → Models: maps to · Repositories operate on Mongo-backed models.
- Identity → Services: uses · Identity endpoints rely on auth, session, MFA, and email services.
- Catalog → Services: uses · Catalog endpoints rely on image and catalog services.
- Requests → Services: uses · Request and operator endpoints rely on request and messaging services.
- Services → AWS: integrates · Upload flows, CloudFront helpers, and infrastructure connect to AWS.
- API client → API app: requests · Frontend HTTP client targets the Express API.