Empowering Citizens, One RTI at a Time
Made with ❤️ for Google Summer of Code (GSoC) and the open-source community
RTI-Gen is an open-source, AI-powered platform that helps Indian citizens generate legally compliant RTI (Right to Information) applications. It transforms plain-language requests into structured, ready-to-file RTI drafts using intelligent logic, rule-based validation, and configurable templates.
- Project Overview
- Features
- Tech Stack
- Architecture
- Getting Started
- Project Structure
- API Documentation
- Testing
- Contributing
- Community & Code of Conduct
- License
RTI-Gen is a civic-tech project designed to make the Right to Information (RTI) process accessible, transparent, and user-friendly for everyone. It is especially built for the Indian context, but the architecture is extensible for other legal document generation use cases.
Many citizens struggle to file RTI applications because:
- They do not know the correct legal format
- They are unsure what information to request
- Templates vary across departments
- Errors can lead to rejection
- Language barriers exist
- Existing tools are static and non-intelligent
RTI-Gen solves these problems by:
- Converting user intent into structured RTI questions
- Applying rule-based logic to ensure correctness
- Generating drafts using configurable templates
- Validating drafts and providing actionable feedback
- Supporting extensibility for future features like multilingual support
This project is developed as part of Google Summer of Code (GSoC) 2026 and welcomes contributions from the global open-source community. We value diversity, collaboration, and learning.
- 📝 Smart RTI Draft Generation — Convert vague descriptions into legally structured applications
- 🧠 Intelligent Question Suggestion — Auto-generate relevant RTI questions based on intent
- ⚖️ Rule-Based Logic Engine — Dynamically apply RTI-specific rules
- 📄 Template-Based Drafting — Use configurable templates for different departments
- ✅ Validation & Scoring — Get quality scores and improvement suggestions
- ✏️ Editable Draft Output — Fine-tune generated drafts before export
- 🌐 Multilingual Support — i18n ready (English, Hindi, and more)
- 📊 Knowledge Graph Visualization — Explore departments and templates visually
- ⚡ Redis Caching — Optimized performance with intelligent caching
- 📱 Responsive Design — Works seamlessly on desktop and mobile
| Technology | Purpose |
|---|---|
| React 19 | UI Framework |
| Vite | Build Tool & Dev Server |
| TailwindCSS 4 | Styling |
| React Router 7 | Routing |
| React Hook Form | Form Management |
| Framer Motion | Animations |
| ReactFlow | Graph Visualization |
| i18next | Internationalization |
| Axios | HTTP Client |
| Technology | Purpose |
|---|---|
| Node.js | Runtime Environment |
| Express.js | Web Framework |
| MongoDB | Database |
| Mongoose | ODM |
| Redis | Caching |
| PDFKit | PDF Generation |
| Natural | NLP Processing |
| Handlebars | Template Engine |
| Winston | Logging |
┌─────────────────────────────────────────────────────────────┐
│ React Frontend │
│ (Landing Page, Generator Workspace, Templates, Graph) │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Express.js API Layer │
│ /api/v1/rti | /api/v1/questions | /api/v1/templates│
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ RTI Core Engines │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Intent │ │ Question │ │ Rule │ │ Template │ │
│ │ Engine │ │ Engine │ │ Engine │ │ Engine │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Draft │ │Validation│ │
│ │ Engine │ │ Engine │ │
│ └──────────┘ └──────────┘ │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ MongoDB (Data) | Redis (Cache) │
└─────────────────────────────────────────────────────────────┘
User Input → Intent Detection → Question Generation → Rule Application
→ Template Selection → Draft Generation → Validation → Final Draft
- Node.js v18 or higher
- MongoDB v6 or higher
- Redis (optional, for caching)
- npm or yarn
-
Clone the repository
git clone https://github.com/your-username/rti-gen.git cd rti-gen -
Setup Backend
cd backend npm install # Create environment file cp .env.example .env # Update .env with your configuration # PORT=5000 # NODE_ENV=development # MONGODB_URI=mongodb://localhost:27017/rti-gen # CORS_ORIGIN=http://localhost:3000 # Seed the database npm run seed # Start development server npm run dev
-
Setup Frontend
cd frontend npm install # Start development server npm run dev
-
Access the Application
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:5000 - Health Check:
http://localhost:5000/api/health
- Frontend:
docker-compose up -drti-gen/
├── README.md # This file
├── PRD.md # Product Requirements Document
│
├── backend/ # Express.js Backend
│ ├── src/
│ │ ├── app.js # Express app configuration
│ │ ├── server.js # Server entry point
│ │ ├── config/ # Database & Redis configuration
│ │ ├── constants/ # Department definitions
│ │ ├── controllers/ # Request handlers
│ │ ├── middlewares/ # Error & validation middleware
│ │ ├── models/ # Mongoose schemas
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic engines
│ │ └── utils/ # Helper functions
│ ├── tests/ # Jest tests
│ └── package.json
│
├── frontend/ # React Frontend
│ ├── src/
│ │ ├── App.jsx # Main application component
│ │ ├── main.jsx # Entry point
│ │ ├── i18n.js # Internationalization config
│ │ ├── components/ # Reusable UI components
│ │ │ ├── common/ # Buttons, UI elements
│ │ │ ├── layout/ # Header, Footer
│ │ │ ├── rti/ # RTI-specific components
│ │ │ └── templates/ # Template components
│ │ ├── pages/ # Page components
│ │ │ ├── LandingPage.jsx
│ │ │ ├── GeneratorWorkspace.jsx
│ │ │ ├── Templates.jsx
│ │ │ └── Graph.jsx
│ │ └── services/ # API service layer
│ ├── public/ # Static assets
│ └── package.json
│
└── doc.md # Additional documentation
http://localhost:5000/api/v1
GET /api/healthPOST /api/v1/rti/generate
Content-Type: application/json
{
"description": "Road construction corruption in my area",
"department": "Municipal",
"applicantName": "John Doe",
"applicantAddress": "123 Main St, City"
}GET /api/v1/questions/suggest?intent=road+construction
POST /api/v1/questions/generateGET /api/v1/templates
GET /api/v1/templates/:id
POST /api/v1/templatesGET /api/v1/graph{
"success": true,
"data": { ... },
"message": "Operation successful"
}cd backend
npm test # Run all tests
npm run test:watch # Watch modecd frontend
npm run lint # Run ESLintWe welcome contributions from students, developers, and civic-tech enthusiasts! Whether you are a GSoC aspirant, a first-time open-source contributor, or an experienced developer, your help is appreciated.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request (PR) on GitHub
- Follow the existing code style and best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Be respectful and collaborative
- 🌐 Add more language translations
- 📝 Create new RTI templates
- 🧪 Write more test cases
- 📖 Improve documentation
- 🐛 Fix bugs and issues
We are committed to fostering a welcoming and inclusive environment for all contributors. Please read our Code of Conduct before participating.
Join our discussions, ask questions, and connect with the community:
- Issues: GitHub Issues
- Discussions: GitHub Discussions
This project is licensed under the MIT License — see the LICENSE file for details.
- Inspired by the need to make RTI filing accessible to all citizens
- Built with ❤️ for civic-tech and open-source communities
- Special thanks to all contributors, mentors, and GSoC organizers
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: contact@chronallabs.com
Empowering Citizens, One RTI at a Time
Made with ❤️ for GSoC & Open Source