A private community application for housing societies where residents can post updates, raise complaints, view announcements, and access important contacts.
Built for the MAD Hackathon using React Native, Node.js, and MongoDB.
- Sign up with flat number, block/tower, and name
- Create posts under categories:
- Maintenance
- Buy/Sell
- Lost & Found
- Events
- Others
- Upload images with posts
- Comment on posts
- Report inappropriate posts
- Main feed sorted by latest posts
- Filter posts by:
- Category
- Block/Tower
- Mute notifications from selected categories
- Pin important notices to the top
- View reported posts
- Remove inappropriate posts
- Important contacts section (security, office, plumber, electrician)
- Mobile-friendly UI
- Secure authentication (JWT)
- React Native
- Expo
- Axios
- Context API / Redux (optional)
- Express.js
- Mongoose
- Cloudinary (for images)
- JWT Authentication
- dotenv
- Nodemon
- MongoDB Atlas
- Mongoose ODM
git clone https://github.com/<your-username>/mysociety.git
cd backendnpm installMONGO_URI=your-mongodb-url
JWT_SECRET=your-secret-key
PORT=5000npm run devIf successful, you should see:
[dotenv] injecting env...
Database Connected Successfully
Server running on port 5000cd frontend
npm install
npm run devScan the QR code in Expo Go (for Android) or use the iOS simulator.
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register | Register a new user |
| POST | /auth/login | Login & receive JWT |
| Method | Endpoint | Description |
|---|---|---|
| POST | /posts/create | Create a new post |
| GET | /posts | Get all posts |
| GET | /posts/:id | Get one post |
| DELETE | /posts/:id | Delete a post (admin only) |
| PUT | /posts/pin/:id | Pin/unpin a post (admin only) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /comments/create | Add a comment |
| GET | /comments/:post_id | Get comments for post |
| Method | Endpoint | Description |
|---|---|---|
| POST | /reports/create | Report a post |
| GET | /reports | View all reports (admin) |
Import the API endpoints and test:
# Authentication
POST /auth/register
POST /auth/login# Post Routes
POST /posts/create
GET /posts
GET /posts/:id
DELETE /posts/:id (admin)
PUT /posts/pin/:id (admin)# Comment Routes
POST /comments/create
GET /comments/:post_id# Report Routes
POST /reports/create
GET /reports (admin)# Admin Routes
GET /admin/posts
GET /admin/reportsPassword hashing using bcrypt
Routes protected using JWT authentication
Admin-only endpoints
Input validation & role-based access
- Devaansh Kathuria
- Aryan Verma