A comprehensive platform for accessing Indian legal documents, Acts, and Rules across all states.
- Advanced Search: Full-text search across act titles, summaries, and metadata
- State-wise Organization: Browse acts by state or access central legislation
- Instant Downloads: Direct access to official PDF documents
- Responsive Design: Optimized for all devices
- Professional Interface: Built for legal professionals and researchers
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Fonts: Inter (body) + Poppins (headings)
- Testing: Jest + React Testing Library
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd case-grid- Install dependencies:
npm install- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
case-grid/
├── app/ # Next.js App Router
│ ├── acts/ # Acts listing and detail pages
│ ├── globals.css # Global styles and Tailwind
│ ├── layout.tsx # Root layout
│ └── page.tsx # Landing page
├── components/ # Reusable React components
│ ├── ActsGrid.tsx # Acts display (table/cards)
│ ├── DownloadButton.tsx # PDF download component
│ ├── Pagination.tsx # Pagination controls
│ ├── SearchBar.tsx # Search input component
│ └── StateFilter.tsx # State selection filter
├── lib/ # Utilities and data
│ ├── seed-data.ts # Sample acts data
│ ├── states.ts # Indian states list
│ ├── types.ts # TypeScript type definitions
│ └── utils.ts # Helper functions
└── public/ # Static assets
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm test- Run testsnpm run test:watch- Run tests in watch mode
interface Act {
id: string;
slug: string;
title: string;
state: string;
year?: number;
category?: 'Act' | 'Rule';
pdfUrl: string;
sizeBytes?: number;
summary?: string;
source?: string;
createdAt?: string;
updatedAt?: string;
}- Hero section with value proposition
- Feature highlights and benefits
- Professional design for legal professionals
- Advanced search with debounced input
- State-based filtering
- Responsive table/card layout
- Pagination and page size selection
- URL-driven state management
- Complete metadata display
- PDF download functionality
- Breadcrumb navigation
- Full-text search across titles and summaries
- State-based filtering (including Central acts)
- Real-time results with URL persistence
- Responsive design for all devices
Edit lib/states.ts to add or modify Indian states.
Update lib/seed-data.ts to change sample acts or add new ones.
Modify app/globals.css and component-specific Tailwind classes.
Run the test suite:
npm testRun tests in watch mode:
npm run test:watch- Push to GitHub
- Connect repository to Vercel
- Deploy automatically
- Build the project:
npm run build - Start production server:
npm run start - Deploy the
outdirectory
To replace the seed data with a real database:
- API Routes: Create endpoints in
app/api/ - Database: Integrate with your preferred database
- Data Fetching: Update components to use real API calls
- Environment Variables: Configure database connections
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For questions or issues, please open a GitHub issue or contact the development team.