How andersonlima12/nlw-esports works
Project type and purpose
• This is a full-stack “NLW-eSports” matchmaking app.
• It ships three client‐side apps (web, React Native mobile) and one backend service.
• Purpose: let gamers find partners for their favorite games, record ads in a database, and send push notifications.
File structure
• Top level:
• mobile/ – React Native (Expo) app
• web/ – ReactJS app (Vite + Tailwind)
• server/ – Node.js + TypeScript service using Express (server.ts) and Prisma + SQLite
• server/prisma – DB schema and migration files
• mobile/src/service – push‐notification token retrieval and config
• web/src/components – UI for browsing games, creating ads
• Each client has tsconfig, package.json, assets folder.
Additional insights from README
• Stack: TypeScript, React, React Native, SQLite, Prisma
• Features: list games, create ads (with weekDays, hours), match partners, trigger Expo push notifications.
Main components
a. Clients:
• Web app (React + Vite)
• Mobile app (React Native + Expo)
b. Backend API:
• Express server (server.ts)
• Prisma ORM layer
• SQLite database
• Utility modules (hour conversion, etc.)
c. External service:
• Expo Push Notification service
• Migration pipeline (prisma migrations)
Relationships and data flows
• Web/Mobile → HTTP REST API → Node/Express
• Express controllers → Prisma → SQLite
• After ad creation or match event, Express calls Expo Push API
• Responses flow back to clients
Architectural patterns and key design principles
• Layered architecture:
• Presentation (clients)
• API layer (routes/controllers in server)
• Business logic & utilities (utils/convert-hour/minutes)
• Data access (Prisma)
• Persistence (SQLite)
• Clear separation of concerns between frontends and backend
• Type‐safe contracts via TypeScript on all layers
Technologies & frameworks
• React, React Native, Expo, Vite, Tailwind CSS
• Node.js, Express, TypeScript
• Prisma ORM, SQLite
• Expo Push Notifications