Built with Next.js, Firebase Authentication, and Supabase database.
Check it out at : iittnif.vercel.app
- User authentication (Email/Password and Google Sign-in)
- Create, read, update, and delete tasks
- Mark tasks as complete/incomplete
- Dark mode support
- Responsive design
- Real-time validation
- Error handling
- Node.js (v18 or higher)
- npm or yarn
- Firebase account
- Supabase account
Create a .env.local file in the root directory with the following variables:
Firebase:
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_STORAGE_BUCKETNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDNEXT_PUBLIC_FIREBASE_APP_ID
Firebase Admin:
FIREBASE_PROJECT_IDFIREBASE_CLIENT_EMAILFIREBASE_PRIVATE_KEY
Supabase:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
Feel Free to use the following :
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRzbWhpZHpwZmNsa2xwcXpjbHBkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mzk1NjY0MzAsImV4cCI6MjA1NTE0MjQzMH0.c2xqqDKwHqw2zXL7pf7-WgIe_GUhODFgQZjFIlZjOGUNEXT_PUBLIC_SUPABASE_URL=https://dsmhidzpfclklpqzclpd.supabase.co
- Clone the repository:
git clone add link here- Install dependencies:
npm install- Run the development server:
npm run devsql
create table tasks ( id uuid default uuid_generate_v4() primary key, title text not null, description text, status text default 'pending', user_id text not null, created_at timestamp with time zone default timezone('utc'::text, now()), updated_at timestamp with time zone default timezone('utc'::text, now()) );
The application includes comprehensive API tests using Jest. Run tests with:
npm test- GET /api/tasks
- Returns tasks sorted by creation date
- Handles database errors appropriately
- POST /api/tasks
- Creates new tasks with validation
- Handles duplicate tasks
- Validates required fields
- PATCH /api/tasks/[id]/complete
- Marks tasks as completed
- Handles non-existent tasks
- Handles database errors
- PUT /api/tasks/[id]
- Updates task details
- Validates input data
- Handles non-existent tasks
Test files location:
src/api/tasks.test.tssrc/components/TaskForm.test.tsxsrc/components/TaskList.test.tsx
npm run dev: Starts development servernpm run build: Builds the applicationnpm start: Starts production servernpm test: Runs testsnpm run test:watch: Runs tests in watch modenpm run test:coverage: Generates test coverage report
- Firebase Authentication for secure user management
- Supabase as the database layer for real-time capabilities and SQL support
- Separation of auth and data concerns for better maintainability
- Animated background with interactive particles (see
AnimatedBackground.tsx) - Dark/Light mode support with smooth transitions
- Responsive design using Tailwind CSS
- Custom color scheme using IITNIF logo colors:
- Primary: Deep red (#951b2a)
- Secondary: Gold/beige (#c2b28a)
- Dynamic opacity and blur effects for depth
- Next.js App Router for modern React patterns
- Client-side state management with React Context
- API Routes for backend functionality
- Zod for runtime type validation
- Jest for comprehensive testing
- Dynamic imports for code splitting
- Optimized canvas rendering for animations
- Debounced user interactions
- Efficient task sorting and filtering
- TypeScript for type safety
- ESLint and Prettier for code consistency
- Comprehensive test coverage
- Environment variable management
- Clear project structure
- Server-side validation of all requests
- Protected API routes
- Secure authentication flows
- Environment variable protection