Joblet is a modern job board application built with Next.js 14, Prisma ORM, and Supabase. It enables companies to post job listings and users to browse and filter available positions based on location and job type. The application features a clean, responsive UI with secure authentication, comprehensive job management, and efficient search functionality.
- Authentication - Secure user authentication using Supabase Auth
- Job Posting - Authenticated users can create job listings
- Job Browsing - Public page to browse all job listings with filtering options
- Job Details - Detailed view of individual job listings
- User Dashboard - Manage your posted jobs (view, edit, delete)
- Responsive Design - Works seamlessly on desktop and mobile devices
- Frontend: Next.js 14 (App Router)
- Backend: Next.js API Routes with Prisma ORM
- Database: PostgreSQL (via Supabase)
- Authentication: Supabase Auth
- Styling: Tailwind CSS with shadcn/ui components
- Deployment: Vercel
- Node.js 18+ or Bun installed
- Supabase account (for database and authentication)
- Git
git clone https://github.com/lutfifadlan/joblet.git
cd jobletUsing npm:
npm installOr using Bun (recommended for faster installation):
bun install- Create a new Supabase project at supabase.com
- Set up authentication providers (Email, Google) in the Supabase dashboard
- Create a custom Prisma user in the SQL Editor:
-- Create custom user
create user "prisma" with password 'your_secure_password' bypassrls createdb;
-- extend prisma's privileges to postgres
grant "prisma" to "postgres";
-- Grant necessary permissions
grant usage on schema public to prisma;
grant create on schema public to prisma;
grant all on all tables in schema public to prisma;
grant all on all routines in schema public to prisma;
grant all on all sequences in schema public to prisma;
alter default privileges for role postgres in schema public grant all on tables to prisma;
alter default privileges for role postgres in schema public grant all on routines to prisma;
alter default privileges for role postgres in schema public grant all on sequences to prisma;Create a .env.local file in the root directory with the following variables:
# Database connection (use the prisma user created above)
DATABASE_URL="postgres://prisma.[PROJECT-REF]:[PASSWORD]@[DB-REGION].pooler.supabase.com:5432/postgres"
# Supabase configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Application URL
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Google OAuth (if using Google authentication)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secretnpx prisma migrate dev --name initial
npx prisma generateUsing npm:
npm run devOr using Bun:
bun devNavigate to http://localhost:3000
/src
/app # Next.js App Router
/api # API routes for server-side operations
/auth # Authentication endpoints
/jobs # Job management endpoints
/users # User endpoint
/contacts # Contact endpoint
/dashboard # User dashboard for managing job posts
/jobs # Job listings and detailed views
/auth # Authentication pages (login, signup)
/contact-us # Contact page
/privacy-policy # Privacy policy page
/terms-of-service # Terms of service page
/components # Reusable UI components
/ui # shadcn/ui components
/magicui # magicui components
/custom-ui # custom ui components
/lib # Utility functions and shared code
/supabase # Supabase client configuration
/prisma # Prisma schema and migrations
/public # Static assets
- Next.js 14 with App Router: Server-side rendering and client-side navigation
- React: Component-based UI development
- TypeScript: Type safety throughout the application
- Tailwind CSS: Utility-first CSS framework for styling
- shadcn/ui: Reusable UI components built on Radix UI
- React Hook Form: Form validation and submission
- Next.js API Routes: Serverless functions for backend operations
- Prisma ORM: Type-safe database access and migrations
- Supabase Auth: Authentication and user management
- PostgreSQL: Relational database (hosted on Supabase)
- Authentication: Users authenticate via Supabase Auth
- Data Access: Authenticated requests access data through Next.js API routes
- Database Operations: API routes use Prisma client to interact with PostgreSQL
- Rendering: Data is rendered server-side or client-side depending on the page requirements
- Vercel: Hosting platform optimized for Next.js applications
- Supabase: Database and authentication services
The development of Joblet followed these key principles:
- User-Centered Design: Focusing on creating an intuitive interface for both job posters and job seekers
- Modular Architecture: Building reusable components and utilities to maintain clean code
- Progressive Enhancement: Starting with core functionality and iteratively adding features
- Performance Optimization: Ensuring fast page loads and responsive interactions
- Security First: Implementing proper authentication and data protection measures
The development process included:
- Planning: Defining requirements and scoping the project
- Setup: Configuring Next.js, Prisma, and Supabase
- Core Development: Building authentication, job posting, and browsing features
- UI Implementation: Creating a responsive and accessible interface
- Testing & Refinement: Manual testing and bug fixes
- Deployment: Deploying to Vercel and configuring production environment
With additional time, these enhancements would be implemented:
- Advanced Search: Full-text search with relevance ranking for job listings
- Job Applications: Direct application submission and tracking system
- Company Profiles: Dedicated pages for companies with branding and multiple job listings
- Email Notifications: Automated alerts for new jobs matching user preferences
- Analytics Dashboard: Insights for job posters about views, clicks, and applications
- Testing: Comprehensive unit, integration, and end-to-end tests
- Mobile App: Native mobile applications for iOS and Android
- AI-Powered Matching: Intelligent job recommendations based on user profiles
- AI-Powered Job Fetching: Pull job listings from reliable sources and display them on the job board automatically
- Magic Link and Google Sign In: Use the magic link and Google sign-in for user authentication
Given 3 days time, build a simple "Mini Job Board" web application where companies can post jobs and users can browse them. Focus on clean code, usability, and fullstack functionality.
- Authentication (Supabase Auth)
- Users can sign up and log in.
- Post a Job
- Authenticated users can create job posts with:
- Title
- Company name
- Description
- Location
- Job type (Full-Time, Part-Time, Contract)
- Authenticated users can create job posts with:
- Browse Jobs
- Public page showing a list of job postings.
- Filter by location or job type.
- Job Detail Page
- View full details of a specific job.
- User Dashboard
- View, edit, or delete jobs that the user posted.
- Frontend: Next.js (use app router)
- Backend: Supabase (for database + auth)
- Deployment: Deploy to Vercel and share the link
- Styling: Use any CSS framework (Tailwind CSS is preferred)
- GitHub repo link with clear README (setup instructions, approach, and architecture overview) - make it public github project
- Live deployed URL (on Vercel)
- Include a brief "What would you improve if given more time?" section in the README
- In the SQL Editor, create a Prisma DB user with full privileges on the public schema.
- This gives you better control over Prisma's access and makes it easier to monitor using Supabase tools like the Query Performance Dashboard and Log Explorer.
-- Create custom user
create user "prisma" with password 'custom_password' bypassrls createdb;
-- extend prisma's privileges to postgres (necessary to view changes in Dashboard)
grant "prisma" to "postgres";
-- Grant it necessary permissions over the relevant schemas (public)
grant usage on schema public to prisma;
grant create on schema public to prisma;
grant all on all tables in schema public to prisma;
grant all on all routines in schema public to prisma;
grant all on all sequences in schema public to prisma;
alter default privileges for role postgres in schema public grant all on tables to prisma;
alter default privileges for role postgres in schema public grant all on routines to prisma;
alter default privileges for role postgres in schema public grant all on sequences to prisma;-
Initialize Prisma:
npx prisma init
-
In your .env file, set the DATABASE_URL variable to your connection string:
DATABASE_URL="postgres://[DB-USER].[PROJECT-REF]:[PRISMA-PASSWORD]@[DB-REGION].pooler.supabase.com:5432/postgres"
-
Change your string's [DB-USER] to prisma and add the password you created in step 1:
postgres://prisma.[PROJECT-REF]...
-
Create new tables in your schema.prisma file:
model Post { id Int @id @default(autoincrement()) title String content String? published Boolean @default(false) author User? @relation(fields: [authorId], references: [id]) authorId Int? } model User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] }
-
Run the migration:
npx prisma migrate dev --name first_prisma_migration
npm install @prisma/client
npx prisma generateJoblet implements several performance optimizations:
- Server Components: Using Next.js 14 server components to reduce client-side JavaScript
- Image Optimization: Automatic image optimization via Next.js Image component
- Route Prefetching: Preloading linked pages for faster navigation
- Edge Caching: Leveraging Vercel's edge network for faster content delivery
- Optimized Database Queries: Efficient Prisma queries with proper relations and selections
Bun is recommended over npm for this project. Bun is an all-in-one JavaScript runtime & toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager.
- Installation: Follow the instructions at https://bun.sh to install Bun locally
- Usage: Use
buninstead ofnpmfor all package.json commands - Lock File: The project uses
bun.lockinstead ofpackage-lock.json - Performance: Bun provides significantly faster installation and development server startup times
