Plataforma Social is split into two independent applications — the Express + Apollo Server backend and the Next.js 14 frontend — and each one reads its own set of environment variables from a separate file. The server reads fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Avendaosander/Plataforma-social/llms.txt
Use this file to discover all available pages before exploring further.
server/.env and the frontend reads from frontend/.env.local. Neither file is committed to version control, so you must create both locally before starting the project.
Server environment variables
The server application (server/.env) requires a database connection string and accepts an optional port override. These values are consumed at startup by Prisma and Express respectively.
MySQL connection string used by Prisma to connect to your database. Follow the format
mysql://USER:PASSWORD@HOST:PORT/DATABASE, replacing each segment with your actual credentials and host details.HTTP port on which the Express server listens. Defaults to
4005 when not set — this is defined in server/src/index.ts as const PORT = process.env.PORT || 4005. Override this only if port 4005 is already in use on your machine.Frontend environment variables
The Next.js frontend (frontend/.env.local) needs three variables: a secret for signing JWT session tokens, the canonical URL of the app itself, and the URL of the GraphQL API that NextAuth calls during authentication.
A random secret string used by NextAuth.js to sign and verify JWT session tokens. Must be set in every environment — NextAuth will throw an error and refuse to start in production if this value is missing.
The canonical base URL of your Next.js application. NextAuth uses this to build callback URLs and redirects. Set it to
http://localhost:3000 for local development and to your deployed domain in production (e.g. https://plataforma-social.example.com).The full URL of the GraphQL endpoint exposed by the backend server. This is read directly inside the NextAuth
authorize function (frontend/app/api/auth/[...nextauth]/route.ts) when it calls fetch to log a user in. Set it to http://localhost:4005/graphql for local development.Example environment files
Copy these templates into the respective directories and fill in your own values before starting either application.server/.env
frontend/.env.local