Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
Config
Next.js ATP-FRONT
Para correr localmente, se necesita la base de datos.
docker-compose up -d
npx prisma db push
Fix Prisma with Docker and MongoDB - How fix connections between Prisma, MongoDB and Docker.
- El -d, significa detached
Configurar las variables de entorno
Renombrar el archivo .env.template a .env
Install ui components:
- Lucide react
- npx shadcn-ui@latest
- npx shadcn-ui@latest add skeleton
- npx shadcn-ui@latest add sheet (mobile sidebar)
- npx shadcn-ui@latest add input (handle inputs)
- npm i zustand (mobile sidebar)
// One Prisma install, check:
- npm i -D prisma (database)
- npx prisma init (create the schema.prisma file)
- Create a model (table) on the schema.prisma
- npx prisma generate (refresh models)
- npx prisma db push (upload to a db and restart the app)
- npm i @prisma/client
- Create the db file on libs folder
Next steps:
- Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
- Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
- Run prisma db pull to turn your database schema into a Prisma schema.
- Run prisma generate to generate the Prisma Client. You can then start querying your database.
Need: