How indie-collective/community works
Project Type and Purpose
• This is a full-stack web application built with the Remix framework (React on the client + server-side routes), Node.js, and PostgreSQL via the Prisma ORM.
• It serves as a community platform for events, games, and organizations, featuring user authentication (OAuth and e-mail/password), file uploads, map search, and external data integrations (IGDB, map services).
Key Architectural Components
a. Frontend (Client)
• Hosted in the browser.
• React components under app/components/ and app/hooks/.
• Remix “entry.client.jsx” bootstraps the client bundle.
• Handles UI state, form actions, map rendering, and API calls via Remix loaders/actions.
b. Backend (Server / Remix Node.js)
• Entry point: app/entry.server.jsx.
• Routes under app/routes/** define loader (GET) and action (POST/PUT/DELETE) functions.
• Central utilities in app/utils/**:
– db.server.js: Prisma client for PostgreSQL
– session.server.js & auth.server.js: session & authentication logic
– email.server.js: transactional e-mail service
– igdb.server.js, imageLinks.server.js: external API wrappers
• File upload handler: createUploadHandler.server.js
c. Database
• PostgreSQL instance
• Prisma schema (prisma/schema.prisma) and migration history (prisma/migrations/**).
d. External Services
• OAuth providers: GitHub, Discord, Steam, Twitter (app/routes/auth/*).
• IGDB API for game metadata.
• Mapbox/Photon for geocoding and map tiles.
• E-mail provider (SES/SMTP).
• Static assets served from public/.
Interactions & Data Flow
• User → Browser UI (React) → Remix route loader/action
• Remix server → Prisma client → PostgreSQL
• Remix server → External APIs (IGDB, Mapbox, E-mail)
• Server ↔ Cookie/session store (in Postgres or signed cookies)
• File uploads → createUploadHandler → Cloud storage / CDN
Architectural Patterns & Principles
• MVC-ish: app/routes (controllers), app/models & Prisma (models), app/components (views).
• Single-page application hydration via Remix streaming.
• Separation of concerns: UI vs. data access vs. integrations.
• Declarative routing: filesystem-based under app/routes.
• Modular services in app/utils for each external integration.