Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Codefied-CodePix/KaroCar-platform/llms.txt

Use this file to discover all available pages before exploring further.

The auth app is the dedicated authentication service for the KaroCar Platform. It acts as the single, centralised sign-in and sign-up entry point — other applications in the monorepo redirect unauthenticated users here to complete login or registration before returning them to their original destination. The homepage (app/page.tsx) renders the Authentication heading and descriptive copy confirming its role within the platform.
The auth app is designed as the centralised authentication point for the entire KaroCar Platform. Rather than each application implementing its own login screens, the web, admin, customer, vendor, and corporate apps all redirect to the auth app for login flows. This keeps authentication logic, session handling, and security policies in one place, making audits and updates straightforward.

Tech Stack

Next.js 16.2.7

App Router with server components for secure, server-side session handling and form processing.

React 19.2.4

Latest stable React for responsive, interactive authentication flows.

Tailwind CSS v4

Utility-first styling consistent with all other apps in the monorepo.

TypeScript 5

Full type safety across authentication logic, form handlers, and session utilities.

Directory Structure

apps/auth/
├── app/
│   ├── layout.tsx    # Root layout with Geist font
│   ├── page.tsx      # Authentication entry page
│   └── globals.css   # Global styles
├── public/           # Static assets
├── package.json
├── next.config.ts
└── tsconfig.json
The app/page.tsx renders the top-level Authentication heading alongside supporting copy. Route groups and additional pages (e.g. /sign-in, /sign-up, /forgot-password) are expected to be added under the app/ directory using Next.js App Router conventions.

Package Configuration

The auth app has no internal workspace UI dependencies — authentication UI is built directly within this app to keep the sign-in surface self-contained and independently deployable.
{
  "name": "auth",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint"
  },
  "dependencies": {
    "next": "16.2.7",
    "react": "19.2.4",
    "react-dom": "19.2.4"
  },
  "devDependencies": {
    "@tailwindcss/postcss": "^4",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "16.2.7",
    "tailwindcss": "^4",
    "typescript": "^5"
  }
}

Development Commands

turbo dev --filter=auth
Use turbo dev --filter=auth to run the authentication service in isolation — perfect when developing sign-in and sign-up flows without needing the full platform stack. The auth app has no workspace package dependencies, so it starts up immediately without any upstream build steps.
Next.js defaults to port 3000. When running alongside other apps (e.g. the web or admin apps), the auth app will be assigned the next free port. Check your terminal output for the exact address.

Building & Starting

turbo build --filter=auth && turbo start --filter=auth
1

Install dependencies

Run pnpm install from the monorepo root to link all workspace packages.
2

Build the auth app

Run turbo build --filter=auth. No upstream workspace packages need to be built first.
3

Start the production server

Run turbo start --filter=auth. Navigate to the printed URL to verify the Authentication page renders correctly.

Linting

pnpm --filter auth lint

Web App

The public-facing site that redirects unauthenticated users to the auth app.

Admin App

The internal dashboard that relies on the auth app for operator sign-in.

Customer Portal

The customer-facing app that depends on the auth app for user sessions.

Local Setup

Step-by-step guide to running the full platform stack locally.

Build docs developers (and LLMs) love