India's most trusted full-stack house rent & buy listing platform ๐๏ธ
๐ Quick Start | โจ Features | ๐ธ Gallery | ๐บ๏ธ API Routes | ๐ฎ Roadmap
"Ghar ki talash, ab ho gayi aasan" โ Making house hunting simple, secure, and Indian.
Apna Adda is more than just a property listing platformโit's your trusted companion in finding the perfect home. Built with Indian sensibilities at its core, we understand that a home isn't just four walls; it's where memories are made and dreams take shape.
- ๐ Comprehensive Listings โ Authority plots, freehold properties, apartments, industrial plots
- ๐ Verified Owners โ Aadhaar verification & ownership document authentication
- ๐ฌ AI Assistant โ Chat with our intelligent bot for instant property recommendations
- ๐ฑ Mobile-First Design โ Beautiful, responsive interface that works everywhere
- ๐ฎ๐ณ Made for India โ Supports Indian property types, documents, and payment preferences
|
|
|
|
|
|
graph TB
A[๐ค Client Browser] --> B{Express Server}
B --> C[๐ Auth Middleware]
C --> D[๐ MongoDB Database]
B --> E[๐ค AI Chat API]
B --> F[๐ Multer File Handler]
F --> G[๐พ Local Storage]
D --> H[(Users Collection)]
D --> I[(Tenants Collection)]
D --> J[(Admins Collection)]
D --> K[(Listings Collection)]
D --> L[(Sessions Store)]
B --> M[๐ JSON Data Files]
M --> N[Authority Plots]
M --> O[Freehold Properties]
M --> P[Industrial Plots]
M --> Q[Apartments]
style B fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff
style D fill:#f093fb,stroke:#f5576c,stroke-width:3px,color:#fff
style E fill:#4facfe,stroke:#00f2fe,stroke-width:3px,color:#fff
// Clean, modern frontend built with:
โ
HTML5 โ Semantic markup
โ
CSS3 โ Custom properties, Flexbox, Grid, Animations
โ
JavaScript (ES6+) โ Modern async/await, modules
โ
jQuery โ AJAX calls, DOM manipulation
โ
Responsive Design โ Mobile-first approachApnaAdda/
โ
โโโ ๐ server.js # Express app entry point
โโโ ๐ .env # Environment configuration
โโโ ๐ package.json # Dependencies
โ
โโโ ๐ models/
โ โโโ User.js # User schema & model
โ โโโ Tenant.js # Tenant registration model
โ โโโ Admin.js # Admin/owner model
โ โโโ Listing.js # Property listing model
โ
โโโ ๐ routes/
โ โโโ auth.js # User auth routes
โ โโโ admin.js # Admin management routes
โ โโโ listings.js # Property CRUD routes
โ โโโ tenant.js # Tenant application routes
โ
โโโ ๐ middleware/
โ โโโ authMiddleware.js # Session validation
โ โโโ uploadMiddleware.js # Multer configuration
โ
โโโ ๐ public/
โ โโโ ๐ css/
โ โ โโโ style.css # Indian-inspired styling
โ โโโ ๐ js/
โ โ โโโ main.js # Client-side logic
โ โโโ ๐ images/ # Static assets
โ โโโ Homepage.html # Landing page
โ โโโ login.html # User login
โ โโโ register.html # User signup
โ โโโ admin.html # Admin dashboard
โ โโโ success.html # Confirmation page
โ
โโโ ๐ uploads/
โ โโโ tenant/ # Tenant photos
โ โโโ ownership_papers/ # Admin documents
โ
โโโ ๐ data/
โ โโโ authority-plots.json # Authority plot listings
โ โโโ freehold-property.json # Freehold listings
โ โโโ industrial-plots.json # Industrial listings
โ โโโ flats-apartments.json # Apartment listings
โ
โโโ README.md
| Method | Endpoint | Description | Request Body | Response |
|---|---|---|---|---|
| POST | /register |
Register new user | {Username, Email, Password} |
User object + session |
| POST | /login |
User login | {Email, Password} |
Session token |
| GET | /session-info |
Get current user | - | User details |
| GET | /logout |
Logout user | - | Success message |
| Method | Endpoint | Description | Request Body | Response |
|---|---|---|---|---|
| POST | /admin/register |
Admin signup with docs | {name, email, password, aadhaar} + files |
Admin object |
| POST | /admin/login-admin |
Admin authentication | {email, password} |
Session token |
| GET | /admin/session-info-admin |
Get admin session | - | Admin details |
| GET | /admin/logout-admin |
Admin logout | - | Success message |
| Method | Endpoint | Description | Request Body | Response |
|---|---|---|---|---|
| POST | /submit-details |
Register as tenant | Form data + photo | Tenant application |
| Method | Endpoint | Description | Query Params | Response |
|---|---|---|---|---|
| GET | /api/listings |
Fetch all listings | ?type=rent&city=delhi |
Array of listings |
| POST | /add-listing |
Create new listing | {city, title, type, rent, area} + image |
Created listing |
| GET | /authority-plots |
Get authority plots | - | Array of plots |
| GET | /freehold-property |
Get freehold listings | - | Array of properties |
| GET | /industrial-plots |
Get industrial plots | - | Array of plots |
| GET | /flats-apartments |
Get apartments | - | Array of flats |
| Method | Endpoint | Description | Request Body | Response |
|---|---|---|---|---|
| POST | /api/chat |
Chat with AI assistant | {message: "3BHK in Mumbai"} |
AI recommendations |
| Method | Endpoint | Description | Response |
|---|---|---|---|
| GET | /load-data |
Load JSON to MongoDB | Success count |
| GET | /load-authority-plots |
Sync authority plots | Loaded items |
| GET | /load-freehold-property |
Sync freehold data | Loaded items |
| GET | /load-industrial-plots |
Sync industrial plots | Loaded items |
| GET | /load-flats-apartments |
Sync apartments | Loaded items |
const UserSchema = new mongoose.Schema({
Username: {
type: String,
required: true,
trim: true,
minlength: 3
},
Email: {
type: String,
required: true,
unique: true,
lowercase: true,
validate: {
validator: function(v) {
return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(v);
}
}
},
Password: {
type: String,
required: true,
minlength: 6
},
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now }
}, { timestamps: true });const TenantSchema = new mongoose.Schema({
tenantName: { type: String, required: true, trim: true },
age: { type: Number, required: true, min: 18 },
email: { type: String, required: true, lowercase: true },
phone: {
type: String,
required: true,
validate: {
validator: function(v) {
return /^[6-9]\d{9}$/.test(v); // Indian mobile number
}
}
},
numPeople: { type: Number, required: true, min: 1 },
propertySelected: { type: String, required: true },
listedAmount: { type: Number, required: true },
readyToPay: { type: Number, required: true },
leaseTime: {
type: String,
enum: ['1 month', '3 months', '6 months', '1 year', '2 years'],
required: true
},
aadhaar: {
type: String,
required: true,
validate: {
validator: function(v) {
return /^\d{12}$/.test(v); // 12-digit Aadhaar
}
}
},
photo: { type: String, required: true },
status: {
type: String,
enum: ['pending', 'approved', 'rejected'],
default: 'pending'
}
}, { timestamps: true });const AdminSchema = new mongoose.Schema({
name: { type: String, required: true, trim: true },
email: {
type: String,
required: true,
unique: true,
lowercase: true
},
passwordHash: { type: String, required: true },
aadhaar: {
type: String,
required: true,
unique: true,
validate: {
validator: function(v) {
return /^\d{12}$/.test(v);
}
}
},
ownershipPaperFileName: { type: String, required: true },
isVerified: { type: Boolean, default: false },
createdAt: { type: Date, default: Date.now }
});const ListingSchema = new mongoose.Schema({
city: {
type: String,
required: true,
index: true
},
title: { type: String, required: true },
type: {
type: String,
enum: ['rent', 'buy', 'lease'],
required: true
},
category: {
type: String,
enum: ['authority-plot', 'freehold', 'industrial', 'apartment'],
required: true
},
rent: { type: Number, required: true, min: 0 },
dateAdded: { type: Date, default: Date.now },
area: { type: String, required: true },
image: { type: String },
amenities: [String],
ownerId: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Admin'
},
views: { type: Number, default: 0 },
isActive: { type: Boolean, default: true }
}, { timestamps: true });๐ฆ Node.js 14.x or higher
๐๏ธ MongoDB 4.x or higher (local or Atlas)
๐ป npm or yarn package manager
๐ Modern web browser# 1๏ธโฃ Clone the repository
git clone https://github.com/SiddharthKumar241/ApnaAdda.git
cd ApnaAdda
# 2๏ธโฃ Install dependencies
npm install
# 3๏ธโฃ Create environment file
cat > .env << EOL
PORT=3000
MONGO_URI=mongodb://localhost:27017/apnaadda
SESSION_SECRET=your_super_secret_key_here_change_in_production
NODE_ENV=development
EOL
# 4๏ธโฃ Create upload directories
mkdir -p uploads/tenant uploads/ownership_papers
# 5๏ธโฃ Start MongoDB (if local)
mongod --dbpath /data/db
# 6๏ธโฃ Run the application
npm start
# 7๏ธโฃ Open in browser
# Navigate to: http://localhost:3000# .env configuration
PORT=3000 # Server port
MONGO_URI=mongodb://localhost:27017/apnaadda # MongoDB connection
SESSION_SECRET=change_this_in_production # Session encryption key
NODE_ENV=development # Environment mode
CLOUDINARY_URL=cloudinary://... # Optional: Cloud storage
AI_API_KEY=your_openai_key # Optional: AI chat featureBeautiful, welcoming homepage with featured listings
Simple, secure registration process
Clean login with session management
Browse categorized properties with filters
Comprehensive property information
Powerful admin controls for listing management
Easy tenant registration with document upload
Clear confirmation after successful actions
The Apna Adda AI assistant uses natural language processing to help users find properties:
// Example chat interactions:
User: "I need a 2BHK flat in Mumbai under 25000"
AI: "Found 12 properties matching your criteria..."
User: "Show me properties with parking"
AI: "Here are 8 apartments with parking facilities..."
User: "What documents do I need for renting?"
AI: "You'll need: Aadhaar card, recent photos,
income proof, and previous address proof..."// Smart suggestions as you type:
Input: "Mum..." โ Suggestions: Mumbai, Mumfordganj
Input: "2BH..." โ Suggestions: 2BHK, 2BHK Apartment
Input: "Authority..." โ Suggestions: Authority Plot, Authority Approved// Password hashing with bcrypt (10 salt rounds)
const hashedPassword = await bcrypt.hash(plainPassword, 10);
// Password verification
const isValid = await bcrypt.compare(inputPassword, hashedPassword);// Secure session configuration
app.use(session({
secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
cookie: {
httpOnly: true, // Prevents XSS attacks
secure: true, // HTTPS only in production
maxAge: 24*60*60*1000 // 24 hour session
},
store: MongoStore.create({ mongoUrl: process.env.MONGO_URI })
}));// Multer configuration with security
const upload = multer({
storage: diskStorage,
limits: { fileSize: 5 * 1024 * 1024 }, // 5MB max
fileFilter: (req, file, cb) => {
const allowedTypes = ['image/jpeg', 'image/png', 'image/jpg'];
if (allowedTypes.includes(file.mimetype)) {
cb(null, true);
} else {
cb(new Error('Invalid file type. Only JPEG/PNG allowed.'));
}
}
});- User authentication system
- Admin/owner registration with verification
- Tenant application system
- Property listing CRUD operations
- Multiple property categories
- Document upload functionality
- Session management
- ๐ Advanced Search with filters (price, location, amenities)
- โค๏ธ Wishlist & Favorites for users
- ๐ง Email Notifications for applications
- ๐บ๏ธ Google Maps Integration for property locations
- โ๏ธ Cloud Storage (Cloudinary) for images
- ๐ฑ Responsive Mobile UI improvements
- ๐จ Dark Mode theme toggle
- ๐ฌ In-App Messaging between tenants and owners
- โญ Rating & Review System for properties
- ๐ Analytics Dashboard for admins
- ๐ Real-Time Notifications using WebSockets
- ๐ Booking Calendar for property visits
- ๐ณ Payment Gateway integration (Razorpay/Stripe)
- ๐ Verified Badge for trusted owners
- ๐ฑ Native Mobile Apps (iOS & Android)
- ๐ค Advanced AI Recommendations using ML
- ๐ Multi-Language Support (Hindi, Tamil, Bengali)
- ๐ Social Login (Google, Facebook, Apple)
- ๐ Price Trend Analytics for localities
- ๐ฅ Virtual Tours with 360ยฐ photos
- ๐ Blockchain for document verification
- ๐ง Email verification with OTP
- ๐ Browser push notifications for new listings
- ๐พ Save search preferences
- ๐ Compare up to 3 properties side-by-side
- ๐ฏ Set price alerts for desired areas
- ๐ View analytics (views, inquiries, conversions)
- ๐ค Auto-response templates for common queries
- ๐ธ Bulk image upload for properties
- ๐ Property performance reports
- ๐ผ Portfolio management for multiple properties
- โก PWA support for offline access
- ๐ SEO-friendly URLs for each listing
- ๐จ Customizable themes
- ๐ Dark mode with user preference save
- ๐ Redis caching for faster load times
- ๐ Google Analytics integration
// Sample test cases:
โ
POST /register
Body: { Username: "test", Email: "test@gmail.com", Password: "123456" }
Expected: 201 Created + user object
โ
POST /login
Body: { Email: "test@gmail.com", Password: "123456" }
Expected: 200 OK + session cookie
โ
GET /api/listings?city=Delhi&type=rent
Expected: Array of Delhi rental properties
โ
POST /submit-details (with file upload)
Expected: 201 Created + tenant application objectUser Flow:
โ Register new account
โ Login successfully
โ View session info
โ Browse listings
โ Filter by category
โ Apply as tenant
โ Logout
Admin Flow:
โ Register with Aadhaar + documents
โ Admin login
โ Add new listing
โ View tenant applications
โ Admin logout
Security:
โ Cannot access protected routes without login
โ Passwords are hashed in database
โ Session expires after logout
โ File uploads validated properly
We welcome contributions from developers who believe in making housing accessible! ๐ก
# 1. Fork the repository
# 2. Create your feature branch
git checkout -b feature/amazing-feature
# 3. Commit your changes
git commit -m "Add: Amazing new feature description"
# 4. Push to the branch
git push origin feature/amazing-feature
# 5. Open a Pull Request- ๐ Bug Reports: Create detailed issue with steps to reproduce
- โจ Feature Requests: Describe the feature and its benefits
- ๐ป Code Contributions: Follow existing code style, add comments
- ๐ Documentation: Help improve README, add code comments
- ๐จ UI/UX: Design improvements always welcome
// Follow these conventions:
โ
Use camelCase for variables: propertyId, userName
โ
Use PascalCase for models: User, Tenant, Listing
โ
Add comments for complex logic
โ
Use async/await over callbacks
โ
Handle errors properly with try-catch
โ
Validate all user inputsThis project is licensed under the MIT License.
Copyright (c) 2025 Siddharth Goutam Kumar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
See the LICENSE file for complete terms.
- Housing.com & 99acres for inspiring the UI/UX
- Indian Real Estate community for insights
- Open Source Community for amazing tools
- MongoDB Atlas for cloud database hosting
- Express.js team for the robust framework
- Node.js community for the ecosystem
- Beta testers from VIT who provided feedback
- Stack Overflow community for debugging help
- GitHub for hosting and version control
โญ Star this repo if Apna Adda helped you find your dream home!
Need Help? Have Questions? Let's Connect!
๐ Report Bug | ๐ก Request Feature | ๐ค Contribute
Making house hunting in India simple, secure, and accessible for everyone ๐ฎ๐ณ