Aura is a full-featured Instagram clone built with modern web technologies. Experience social media like never before with real-time messaging, photo sharing, and seamless user interactions.
- JWT Authentication - Secure user login/registration
- Password Encryption - bcrypt hashing for secure storage
- Cookie-based Sessions - HTTP-only cookies for enhanced security
- Protected Routes - Role-based access control
- Image Upload - Cloudinary integration for image storage
- Image Optimization - Sharp.js for automatic resizing and compression
- Create Posts - Upload photos with captions
- Delete Posts - Remove your own posts (with admin override)
- View Posts - Instagram-like feed with infinite scroll
- Like/Unlike Posts - Heart button functionality with duplicate prevention
- Comments System - Add, view, and manage comments
- Bookmark Posts - Save posts for later viewing
- Follow/Unfollow - Build your social network
- User Search - Find users with real-time search
- Direct Messages - Instagram-like chat interface
- Real-time Delivery - Socket.IO powered instant messaging
- Online Status - See who's online
- Message Notifications - Live notification system
- Conversation Management - Organized chat threads
- Profile Customization - Edit bio, profile picture, and privacy settings
- Private Accounts - Control who can see your content
- Followers/Following Lists - View social connections
- User Posts Grid - See all posts from any user
- User Management - Admin can remove users with complete data cleanup
- Content Moderation - Comment filtering for inappropriate content
- System Monitoring - Comprehensive error handling and logging
- Node.js - Runtime environment
- Express.js - Web application framework
- MongoDB - NoSQL database with Mongoose ODM
- Socket.IO - Real-time bidirectional communication
- Cloudinary - Cloud-based image management
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- Multer - File upload middleware
- Sharp - Image processing
- React 19 - User interface library
- Redux Toolkit - State management
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Axios - HTTP client
- Lucide React - Icon library
- Vite - Build tool and development server
- Node.js 20+ installed
- MongoDB database (local or cloud)
- Cloudinary account for image storage
- Clone the repository
git clone https://github.com/sparshsharma81/Aura.git
cd Aura- Install dependencies
# Install all dependencies (backend + frontend)
npm run build- Environment Setup
Create .env file in the backend directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
SECRET_KEY=your_jwt_secret_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
SPECIAL_USER_ID=admin_user_id_here
NODE_ENV=development- Start the application
# Development mode
npm run dev
# Production mode
npm startThe app will be available at http://localhost:5000
Aura/
βββ backend/
β βββ controllers/ # Business logic
β β βββ user.controller.js
β β βββ post.controller.js
β β βββ message.controller.js
β βββ models/ # Database schemas
β β βββ user.model.js
β β βββ post.model.js
β β βββ comment.model.js
β β βββ message.model.js
β β βββ conversation.model.js
β βββ routes/ # API endpoints
β β βββ user.route.js
β β βββ post.route.js
β β βββ message.route.js
β βββ middlewares/ # Custom middleware
β β βββ isAuthenticated.js
β β βββ multer.js
β β βββ isBlueTick.js
β βββ utils/ # Utility functions
β β βββ db.js
β β βββ cloudinary.js
β β βββ datauri.js
β βββ socket/ # Real-time functionality
β β βββ socket.js
β βββ index.js # Server entry point
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β β βββ ui/ # Reusable UI components
β β β βββ Home.jsx
β β β βββ Profile.jsx
β β β βββ Messages.jsx
β β β βββ ...
β β βββ redux/ # State management
β β β βββ store.js
β β β βββ authSlice.js
β β β βββ postSlice.js
β β β βββ chatSlice.js
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility functions
β β βββ main.jsx # App entry point
β βββ public/ # Static assets
β βββ package.json
βββ README.md
POST /api/v1/user/register- User registrationPOST /api/v1/user/login- User loginGET /api/v1/user/logout- User logout
GET /api/v1/user/:id/profile- Get user profilePOST /api/v1/user/profile/edit- Edit profileGET /api/v1/user/suggested- Get suggested usersGET /api/v1/user/search?query=username- Search usersPOST /api/v1/user/follow/:id- Follow/unfollow user
POST /api/v1/post/addpost- Create new postGET /api/v1/post/all- Get all posts (feed)GET /api/v1/post/userpost/all- Get user's postsGET /api/v1/post/:id/like- Like postGET /api/v1/post/:id/dislike- Unlike postPOST /api/v1/post/:id/comment- Add commentDELETE /api/v1/post/delete/:id- Delete postGET /api/v1/post/:id/bookmark- Bookmark post
POST /api/v1/message/send/:id- Send messageGET /api/v1/message/:id- Get conversation messages
- MainLayout - App shell with navigation
- LeftSideBar - Navigation menu
- RightSideBar - Suggestions and activity
- Feed - Main content area
- Post - Individual post component
- CreatePost - Post creation modal
- Profile - User profile page
- Messages - Chat interface
- SearchBox - User search functionality
- Radix UI components for accessibility
- Custom styled components with Tailwind CSS
- Responsive design for all screen sizes
newMessage- New chat message receivedmessageNotification- Message notificationnotification- General notifications (likes, follows, comments)user-online- User online statususer-offline- User offline status
# Start backend server (with nodemon)
npm run dev
# Start frontend dev server
cd frontend && npm run dev# Build frontend and start production server
npm run build
npm start- JWT Authentication with HTTP-only cookies
- Password hashing with bcrypt (10 rounds)
- CORS configuration for cross-origin requests
- Input validation and sanitization
- File upload restrictions (images only)
- Rate limiting considerations
- XSS protection with secure headers
- Personal information (username, email, bio)
- Social connections (followers, following)
- Content references (posts, bookmarks)
- Privacy settings (isPrivate)
- Content (image, caption)
- Engagement (likes, comments)
- Metadata (author, timestamp)
- Real-time chat system
- Participant management
- Message history
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Cloudinary for image storage and optimization
- MongoDB for flexible data storage
- Socket.IO for real-time communication
- Radix UI for accessible components
- Tailwind CSS for rapid styling
Sparsh Sharma - @sparshsharma81
Project Link: https://github.com/sparshsharma81/Aura
