This project was developed as a take-home assignment for a Fullstack Developer position at Roc8-Career as part of the Moonshot competition. The application is built using Next.js, TypeScript, Tailwind CSS, Prisma, and PostgreSQL (NeonDB), and is deployed on Vercel.
- Signup System with OTP: Users can sign up using their email. An OTP is sent to the provided email for verification.
- Login: Users can log in using their email and password.
- Category Management: Logged-in users can view all categories and toggle (check/uncheck) their selection. The selected categories are saved to their profile and persisted across sessions.
- Frontend: Next.js, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL (NeonDB)
- Deployment: Vercel
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL
- Clone the repository:
git clone https://github.com/AnmolDotX/roc8-assignment.git
cd roc8-assignment
- Install dependencies:
npm install
# or
yarn install
Create a .env
file in the root of your project and add the following environment variables:
API_BASE_URL="same as the base url for this app"
DATABASE_URL="postgres database connection string"
ACCESS_TOKEN_SECRET="your secret access token key"
REFRESH_TOKEN_SECRET="your secret refresh token key"
RESEND_API_KEY="your resend api key"
- Generate Prisma model in Database:
npm run db:generate
- seed 100 of data in database:
cd src/data
node seed.js
- Start the development server:
npm run dev
# or
yarn dev
The application will be available at http://localhost:3000
.
The application is deployed on Vercel. live
-
New Endpoints:
checked-category
: Allows users to fetch only their checked categories.logout
: Removes the HTTP-only cookie set at login to log the user out.
-
CSS Enhancements: Improve the visual aesthetics of the application.
-
Additional Features: More user profile options and settings.
For any questions or feedback, feel free to contact me at anmolfolio@gmail.com.