Skip to content

MRIARC-08/VidyaSetu

Repository files navigation

VidyaSetu

GSSoC 2026 Open Source Next.js PostgreSQL

AI-powered adaptive study and assessment platform for NCERT-based learning.

VidyaSetu helps students move from passive studying to structured practice with chapter-wise study material, quiz workflows, subjective answer evaluation, and analytics.

GSSoC 2026

This project is part of GirlScript Summer of Code 2026.

Contributors can start by checking issues labeled:

  • good first issue
  • beginner friendly
  • gssoc
  • documentation
  • bug
  • enhancement

Features

  • NCERT class, subject, and chapter browsing
  • Chapter-based quiz creation
  • Practice, test, and revision quiz modes
  • Subjective answer evaluation workflow
  • Notes upload and extraction workflow
  • Student dashboard and analytics views
  • Admin flows for NCERT and question management

Tech Stack

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Prisma ORM
  • PostgreSQL
  • NextAuth
  • Cloudinary

Getting Started

Prerequisites

  • Node.js
  • pnpm
  • PostgreSQL database

You can use either a hosted PostgreSQL database or a local PostgreSQL database through Docker.

Environment Setup

Create your local environment file:

cp .env.example .env

Never commit .env. Use your own database credentials and API keys.

Environment Variables

DATABASE_URL

This is the PostgreSQL connection string used by the app at runtime.

If you use Docker, keep the default value from .env.example:

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/vidyasetu"

If you use Supabase, Neon, Railway, or another hosted PostgreSQL provider, copy the PostgreSQL connection string from that provider and paste it here.

DIRECT_URL

This is the direct PostgreSQL connection string used by Prisma migrations.

If you use Docker, keep the default value from .env.example:

DIRECT_URL="postgresql://postgres:postgres@localhost:5432/vidyasetu"

If you use Supabase, use the direct database connection URL, not only the pooled URL. Prisma migrations work best with a direct connection.

JWT_SECRET

This is used to sign authentication tokens.

For local development, generate a random value:

openssl rand -base64 32

Then paste it into .env:

JWT_SECRET="your-generated-secret"

NEXTAUTH_URL

For local development, use:

NEXTAUTH_URL="http://localhost:3000"

For deployment, use your deployed app URL.

GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET

These are needed only for Google login.

To get them:

  1. Go to Google Cloud Console.
  2. Create or select a project.
  3. Configure the OAuth consent screen.
  4. Create OAuth credentials for a web application.
  5. Add this authorized redirect URI for local development:
http://localhost:3000/api/auth/callback/google
  1. Copy the generated client ID and client secret into .env:
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"

If you are not working on authentication, you can leave these empty for local development.

Cloudinary Variables

Cloudinary is optional for now and is not required for the main contributor setup.

Only add these if you are working on upload or media-related features:

CLOUDINARY_CLOUD_NAME="your-cloudinary-cloud-name"
CLOUDINARY_API_KEY="your-cloudinary-api-key"
CLOUDINARY_API_SECRET="your-cloudinary-api-secret"

You can get these values from your own Cloudinary dashboard after creating a free Cloudinary account.

Database Setup

Option A: Hosted PostgreSQL

Use this option if you do not have Docker installed.

Create a free PostgreSQL database using Supabase, Neon, Railway, or another PostgreSQL provider. Then update these values in .env:

DATABASE_URL="your-hosted-postgresql-url"
DIRECT_URL="your-direct-postgresql-url"

For Supabase, DATABASE_URL usually points to the pooled connection URL and DIRECT_URL points to the direct connection URL used by Prisma migrations.

Option B: Docker PostgreSQL

Use this option if you have Docker installed and want a local database.

Start PostgreSQL:

docker compose up -d

The default .env.example database URLs already match the Docker database:

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/vidyasetu"
DIRECT_URL="postgresql://postgres:postgres@localhost:5432/vidyasetu"

Install And Run

Install dependencies:

pnpm install

Generate the Prisma client:

pnpm db:generate

Run migrations:

pnpm db:migrate

Seed the database:

pnpm db:seed

Start the development server:

pnpm dev

Open http://localhost:3000.

Seed Data

The seed script populates your own local or hosted contributor database with NCERT academic classes, subjects, chapters, and direct PDF links.

Contributors do not need access to the maintainer's production database.

Useful Commands

pnpm dev
pnpm build
pnpm lint
pnpm db:generate
pnpm db:migrate
pnpm db:seed
pnpm db:studio

Contributing

Before contributing, read:

  1. Fork the repository.
  2. Clone your fork.
  3. Create .env from .env.example.
  4. Set up PostgreSQL using either hosted PostgreSQL or Docker.
  5. Run migrations and seed your database.
  6. Create a feature branch.
  7. Open a pull request.

Do not request or use production database access for local development.

Recommended Repository Labels

Maintainers can use these labels to make contribution discovery easier:

  • gssoc
  • gssoc:approved
  • gssoc:level1
  • gssoc:level2
  • gssoc:level3
  • good first issue
  • beginner friendly
  • documentation
  • bug
  • enhancement

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors