How amirphiladam2/swepack works
SWEPack is a resource-discovery and curation product: users browse and search a library, submit resources for review, save finds, and organize them into private collections; administrators manage moderation and taxonomy. The Next.js app proxies requests to a NestJS REST API, whose domain services use Prisma with PostgreSQL. Authentication supports Firebase-backed sessions, GitHub sign-in/linking, and optional password-reset email. Several frontend-to-feature connections and unsampled backend modules are included only where the README documents them; edges cite that documentation or shown source references.
Main entry points: app Next.js app · app.module.ts NestJS REST API · auth.service.ts Authentication service · prisma.service.ts Prisma data access
Components 22
Web experience
- Next.js app
frontend/src/app - API proxy
frontend/src/app/api/backend/[...path]/route.ts - Resource browsing
frontend/src/app/page.tsx - Resource submission
frontend/src/components/resources/submit-resource-form.tsx - Account and admin
frontend/src/app/account/page.tsx - Collection screens
frontend/src/app/collections
Identity and sessions
- Authentication routes
backend/src/auth/auth.controller.ts - Authentication service
backend/src/auth/auth.service.ts - GitHub OAuth
backend/src/auth/github-oauth.service.ts
Resource catalog
- Resource routes
backend/src/resources/resources.controller.ts - Resource catalog service
backend/src/resources/resources.service.ts - Metadata preview
backend/src/resources/resource-metadata.service.ts - Categories and tags
backend/src/categories
Curation and administration
- Collection routes
backend/src/collections/collections.controller.ts - Collection service
backend/src/collections/collections.service.ts
Other components
- Visitor
- NestJS REST API
backend/src/app.module.ts - Firebase Auth
- GitHub
- Email provider
- Prisma data access
backend/src/prisma/prisma.service.ts - PostgreSQL
Connections 25
- Visitor → Next.js app: uses
README.md - Next.js app → API proxy: sends API requests
README.md - API proxy → NestJS REST API: forwards requests
README.md - Next.js app → Resource browsing: presents browsing
README.md - Next.js app → Resource submission: presents submission
README.md - Next.js app → Account and admin: presents account tools
README.md - Next.js app → Collection screens: presents collections
README.md - NestJS REST API → Authentication routes: routes authentication
- Authentication routes → Authentication service: delegates to
backend/src/auth/auth.controller.ts - Authentication service → Firebase Auth: verifies tokens
backend/src/auth/auth.service.ts - Authentication routes → GitHub OAuth: uses OAuth flow
backend/src/auth/auth.controller.ts - GitHub OAuth → GitHub: exchanges identity
backend/src/auth/github-oauth.service.ts - GitHub OAuth → Authentication service: creates access token
backend/src/auth/github-oauth.service.ts - Authentication service → Email provider: sends reset email
backend/src/auth/auth.service.ts - NestJS REST API → Resource routes: routes resources
- Resource routes → Resource catalog service: delegates to
backend/src/resources/resources.controller.ts - Resource routes → Metadata preview: fetches preview
backend/src/resources/resources.controller.ts - Resource catalog service → Prisma data access: queries data
backend/src/resources/resources.service.ts - NestJS REST API → Categories and tags: serves taxonomy
backend/src/categories/categories.controller.ts - Categories and tags → Prisma data access: reads and writes
backend/src/categories/categories.service.ts - NestJS REST API → Collection routes: routes collections
- Collection routes → Collection service: delegates to
backend/src/collections/collections.controller.ts - Collection service → Prisma data access: reads and writes
backend/src/collections/collections.service.ts - Authentication service → Prisma data access: persists accounts
backend/src/auth/auth.service.ts - Prisma data access → PostgreSQL: connects through adapter
backend/src/prisma/prisma.service.ts