This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Prompt Diary now stores entries in MongoDB through Next.js Route Handlers:
GET /api/promptsPOST /api/promptsDELETE /api/prompts/:id
Quick Dial stores website entries in MongoDB through:
GET /api/quick-dialsPOST /api/quick-dialsDELETE /api/quick-dials/:id
Create a local .env.local file with:
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster-url>/?retryWrites=true&w=majority
MONGODB_DB=<database-name>
MONGODB_PROMPTS_COLLECTION=prompts
MONGODB_QUICK_DIALS_COLLECTION=quick_dials
ADMIN_DELETE_PASSWORD=<strong-admin-password>Notes:
MONGODB_PROMPTS_COLLECTIONis optional. It defaults toprompts.MONGODB_QUICK_DIALS_COLLECTIONis optional. It defaults toquick_dials.ADMIN_DELETE_PASSWORDis required for delete operations; deletion returns unauthorized without the correct value.- Restart the dev server after changing env vars.
- If you deploy (for example on Vercel), add the same env vars in your deployment settings.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.