Gems of India (https://gemsofindia.org) is a community-driven platform to rate and review government officials and politicians in India, from the village to the central level. The goal is to bring transparency, accountability, and awareness about those who serve the nation.
This platform allows users to:
- Search for any politician or government officer.
- Submit reviews on their performance.
- Upload verified evidence or references.
- Explore top-rated and lowest-rated officials.
- Report corruption.
This platform is not about hate; it's about accountability.
This is a Next.js project. Follow the instructions below to get it up and running on your local machine for development and testing purposes.
Before you begin, ensure you have the following installed:
- Node.js (v22.x or later)
- pnpm (v10 or later)
- PostgreSQL
-
Clone the repository:
git clone https://github.com/varunmara/gems-of-india.git cd gems-of-india -
Install dependencies:
pnpm install
-
Set up environment variables:
Copy the
.env.examplefile to a new file named.env:cp .env.example .env
Open
.envand update the variables with your own values. At a minimum, you'll need to provide theDATABASE_URLfor your PostgreSQL database. -
Set up the database:
Run the following command to apply the database schema:
pnpm run db:push
-
Run the development server:
pnpm run dev
The application should now be running at http://localhost:3000.
The easiest way to get started is with Docker. This will set up PostgreSQL 17, Redis 7, and the Next.js app with one command:
# Start everything (runs in background)
pnpm docker:up:dev
# View logs
pnpm docker:logs
# Stop everything
pnpm docker:downWhat happens automatically:
- PostgreSQL 17 database created and configured
- Redis 7 for caching and sessions
- Database schema migrated
- Dummy data seeded (users, entities, reviews, etc.)
- Development server starts with hot reload
Access:
- App: http://localhost:3000
- Database:
localhost:5432(user:gems, password:gems_password) - Redis:
localhost:6379
Test Users (after seeding):
- Admin: [email protected]
- Moderator: [email protected]
- User: [email protected]
For complete Docker documentation including production setup, see DOCKER.md.
This project includes the following scripts, which can be run with pnpm run <script_name>:
dev: Starts the development server using Next.js with Turbopack.build: Creates a production-ready build of the application.start: Starts the production server.lint: Lints the codebase using Next.js's built-in ESLint configuration.db:generate: Generates database migration files with Drizzle Kit.db:migrate: Applies generated migrations to the database.db:push: Pushes the schema directly to the database (useful for development).db:seed: Seeds the database with dummy data.db:studio: Opens Drizzle Studio, a GUI for your database.categories: A script for managing categories.docker:up:dev: Start development environment with Docker.docker:down: Stop Docker containers.docker:logs: View Docker logs.docker:up:prod: Start production environment with Docker.