Skip to content

Repository files navigation

TalentFlow - ATS Project Foundation

This repository contains the scalable project foundation for the Applicant Tracking System (ATS) intern assignment. It is pre-configured with Next.js 15, TypeScript (Strict Mode), Tailwind CSS v4, shadcn/ui, Prisma ORM 7, SQLite, Vitest (unit/integration testing), and Playwright (end-to-end testing).


🛠️ Technology Stack

  • Framework: Next.js 15.5 (App Router)
  • Language: TypeScript 5 (Strict mode enabled)
  • Styling: Tailwind CSS v4 & shadcn/ui
  • Database ORM: Prisma ORM 7.8
  • Database Engine: SQLite (Local dev.db)
  • Database Driver Adapter: @prisma/adapter-better-sqlite3 & better-sqlite3
  • Unit Testing: Vitest & React Testing Library (jsdom environment)
  • E2E Testing: Playwright

📂 Scalable Folder Structure

The project conforms to the expected folder structure and separates core domains:

├── app/                  # Next.js App Router (pages, layouts, globals.css)
│   ├── components/       # Custom page components or page-level items
│   ├── favicon.ico       # Website favicon
│   ├── globals.css       # Tailwind CSS v4 & custom theme definitions
│   ├── layout.tsx        # Global HTML layout, Google Font Setup (Outfit)
│   └── page.tsx          # Dynamic Seed Verification homepage
├── components/           # Reusable UI components
│   └── ui/               # shadcn/ui components (button, card, input, badge)
├── lib/                  # Shared library scripts and utility exports
│   ├── db.ts             # Prisma Client instance with SQLite driver adapter
│   └── utils.ts          # Tailwind utility helper (cn class-names merger)
├── prisma/               # Database schemas and migration configurations
│   ├── migrations/       # SQL migrations history generated by Prisma
│   ├── schema.prisma     # Prisma database schemas (Job, Candidate, Application)
│   └── seed.ts           # TS Database Seeding mechanism
├── tests/                # Testing directory split by test type
│   ├── e2e/              # Playwright E2E tests
│   │   └── basic.spec.ts # Basic page load verification test
│   ├── unit/             # Vitest Unit/Integration tests
│   │   └── basic.test.tsx# Home page element rendering unit test
│   └── setup.ts          # Testing Library matchers setup for Vitest
├── types/                # Shared TypeScript models and application type exports
│   └── ats.ts            # Job, Candidate, Application type definitions
├── .env                  # Environment config variables (local database path)
├── eslint.config.mjs     # ESLint linter configuration
├── next.config.ts        # Next.js config settings
├── package.json          # Dependency scripts and metadata
├── playwright.config.ts  # Playwright configuration
├── postcss.config.mjs    # PostCSS configuration for Tailwind v4
├── prisma.config.ts      # Prisma 7 centralized configuration file
├── tsconfig.json         # TypeScript strict configuration file
└── vitest.config.ts      # Vitest configuration file

🚀 Setup & Installation Instructions

Follow these steps to set up the project locally:

1. Prerequisites

Ensure you have Node.js (v20+ recommended) installed on your system.

2. Install Dependencies

Clone the repository and run the following command to install the required packages:

npm install

3. Run Database Migrations

Create the local SQLite database (dev.db at the root) and apply migrations:

npx prisma migrate dev --name init

4. Seed the Database

Populate the database with initial jobs, candidates, and applications:

npm run db:seed

5. Start the Development Server

Run the local Next.js development server:

npm run dev

Open http://localhost:3000 in your browser. The landing page will dynamically fetch and list the seeded database objects, verifying that the database connection is fully active.


🧪 Running Tests

Unit & Integration Tests (Vitest)

To run unit tests (located in tests/unit):

npm run test

To run tests in watch mode (interactive development):

npm run test:watch

End-to-End Tests (Playwright)

Ensure the dev server or local production builds can boot. Run the E2E test suite (located in tests/e2e):

npm run test:e2e

💡 Architectural Decisions (Prisma 7 & SQLite)

This project is built using Prisma 7.8.0, which introduces significant changes in connection behavior:

  1. Centralized Configuration (prisma.config.ts): Connection URLs are no longer configured within schema.prisma. Instead, they reside in prisma.config.ts and fetch environment variables from .env.
  2. Driver Adapters: Prisma 7 deprecates native Rust-based engine connections for local setups in favor of Driver Adapters. Consequently, the project connects to the database via @prisma/adapter-better-sqlite3 and the better-sqlite3 package in lib/db.ts.
  3. centralized seeding: Under Prisma 7, the seed command config resides in prisma.config.ts under the migrations.seed key rather than package.json.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages