Included dependencies
- next, react, react-dom for the app runtime
- better-sqlite3 for local persistence
- zod for request validation
- nanoid for unique short codes
This project is configured with Next.js route handlers, SQLite, Zod validation, and Nano ID short-code generation. The local database initializes itself automatically so you can start building on top of the API immediately.
curl -X POST http://localhost:3000/api/shorten \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","customCode":"demo123"}'Start the dev server, create links through the API, and build your URL creation form or analytics UI on top of the routes already added.
npm run dev