- About
- Key Features
- Tech Stack
- Project Structure
- System Architecture
- Database Schema
- Authentication System
- API Routes
- Installation & Setup
- Environment Configuration
- UI/UX Improvements
- Deployment Guide
- Contributing
- License
Findify is a comprehensive full-stack web application that bridges the gap between consumers and local businesses. The platform enables users to discover, review, and connect with businesses in their area, while providing business owners with tools to manage their presence and engage with customers.
To empower local economies by creating a transparent, community-driven marketplace where businesses can thrive and customers can discover authentic local experiences.
- Production Ready: Full authentication system with OTP verification
- Features Complete: Reviews, ratings, messaging, premium accounts
- Performance Optimized: Smooth animations, responsive design
- Security Enhanced: Multi-provider OAuth, secure password reset
-
π Location-Based Discovery
- Find nearby businesses using geolocation
- Interactive Mapbox integration
- Distance-based filtering and sorting
- Real-time location validation
-
β Review & Rating System
- Leave detailed reviews with 1-5 star ratings
- View average ratings and review counts
- Edit or delete personal reviews
- See review history and timestamps
-
β€οΈ Favorites Management
- Save favorite businesses
- Quick access to saved businesses
- Persistent storage across sessions
- Favorites count and management
-
π Advanced Search
- Search by business name or keywords
- Filter by category, rating, distance
- Real-time search results
- Category-based browsing with sorting
-
π¬ Messaging System
- Direct messaging with businesses
- Real-time message notifications
- Message history and persistence
- Unread message counter
-
π± Responsive Design
- Mobile-first approach
- Works seamlessly on all devices
- Touch-friendly interface
- Fast loading times with optimizations
-
πͺ Business Profile Management
- Create comprehensive business listings
- Upload and manage business images
- Edit business information in real-time
- Manage business hours and details
-
π Analytics Dashboard
- View profile statistics and traffic
- Track customer reviews and ratings
- Monitor message conversations
- Performance metrics and insights
-
ποΈ Premium Features
- Featured business placement
- Premium badge on listings
- Higher search visibility
- Featured carousel placement
- Enhanced customer reach
-
πΌ Business Operations
- Respond to customer messages
- Track and manage reviews
- Update business information
- Manage business images and gallery
-
Email Verification (OTP)
- 6-digit OTP sent to email
- 10-minute expiry window
- Resend OTP functionality
- Email validation on registration
-
Multi-Provider Authentication
- Local email/password authentication
- Google OAuth integration
- GitHub OAuth integration
- Account linking and management
-
Secure Password Management
- Bcrypt password hashing
- Forgot password with OTP verification
- Password reset confirmation
- Secure session management
- Passport.js session handling
| Layer | Technology | Version | Purpose |
|---|---|---|---|
| Runtime | Node.js | v22.13.1 | JavaScript server environment |
| Framework | Express.js | Latest | Web application framework |
| Database | MongoDB | Atlas | NoSQL document database |
| ODM | Mongoose | Latest | MongoDB object mapping |
| Auth | Passport.js | Latest | Authentication middleware |
| OAuth Providers | Google + GitHub | Latest | Multi-provider authentication |
| Templating | EJS + ejs-mate | Latest | Server-side rendering |
| CSS Framework | Bootstrap | v5.3.7 | Responsive UI framework |
| Icons | Lucide Icons | Latest | Modern icon library |
| Maps | Mapbox GL | v3.14.0 | Interactive mapping service |
| Image Storage | Cloudinary | Latest | Cloud image management |
| Email Service | Resend | Latest | Transactional emails |
| Payments | Razorpay | Latest | Payment processing |
| Password Hash | Bcrypt | Latest | Secure password hashing |
| Crypto | Node.js crypto | Built-in | OTP generation |
Local Business Finder/
β
βββ π app.js # Main Express application (2377 lines)
βββ π cloudconfig.js # Cloudinary configuration
βββ π createAdmin.js # Admin creation utility
βββ π mapbox.js # Mapbox integration
βββ π middleware.js # Custom middleware functions
βββ π package.json # Project dependencies
βββ π README.md # Complete documentation
β
βββ π models/ # Mongoose Data Models
β βββ Business.js # Business schema with GeoJSON
β βββ User.js # User schema with OAuth fields
β βββ Review.js # Review schema with ratings
β
βββ π routes/ # Express Route Handlers
β βββ auth.js # Authentication routes
β βββ business.js # Business CRUD routes
β
βββ π views/ # EJS Templates (Server-side)
β βββ layouts/
β β βββ boilerplate.ejs # Main layout template
β βββ index.ejs # Home page with featured businesses
β βββ discover.ejs # Business discovery page
β βββ show.ejs # Business details page
β βββ edit.ejs # Edit business page
β βββ new.ejs # Create business page
β βββ about.ejs # About page
β βββ contact.ejs # Contact page
β βββ login.ejs # Login page with OAuth
β βββ register.ejs # Registration page with OAuth
β βββ verify-otp.ejs # OTP verification form
β βββ forgot-password.ejs # Forgot password form
β βββ reset-password.ejs # Reset password form
β βββ dashboard.ejs # Admin dashboard
β βββ user-dashboard.ejs # User profile dashboard
β βββ admin-dashboard.ejs # Admin management panel
β βββ Premium.ejs # Premium features page
β βββ Privacy.ejs # Privacy policy
β βββ Terms.ejs # Terms of service
β βββ error.ejs # Error page
β βββ chatbot.ejs # Chatbot interface
β βββ chatbot-analytics.ejs # Chatbot analytics
β βββ edit-review.ejs # Edit review form
β
βββ π public/ # Static Assets
β βββ css/
β β βββ index.css # Main styles + animations
β β βββ chatbot.css # Chatbot styling
β βββ js/
β β βββ chatbot.js # Chatbot functionality
β β βββ premium.js # Premium features logic
β βββ Images/ # Static images
β βββ sitemap.xml # XML sitemap for SEO
β
βββ π utils/ # Utility Functions
βββ otp.js # OTP generation + email
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT LAYER β
β βββββββββββββββ ββββββββββββ ββββββββββββ β
β β EJS HTML β βBootstrap β βJavaScriptβ β
β β Templates β βCSS + Animβ βInteractivityβ β
β βββββββββββββββ ββββββββββββ ββββββββββββ β
ββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β HTTP/HTTPS
ββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β EXPRESS.JS SERVER β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Routes Layer β
β ββ /auth/* (Authentication) β
β ββ /business/* (Business Operations) β
β ββ /messages/* (Messaging) β
β ββ /search (Discovery) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Middleware Stack β
β ββ Express.json (Body Parsing) β
β ββ Passport.js (Authentication) β
β ββ Express-session (Sessions) β
β ββ Custom Middleware (Validation) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Business Logic β
β ββ User Management β
β ββ Business Operations β
β ββ Review System β
β ββ Messaging β
ββββββββ¬βββββ¬βββββββ¬βββββββ¬βββββββ¬ββββββββββββββββββββββ
β β β β β
βββββΌββββ βββββββΌβββββββΌββββββΌββββ
βMongoDBββ βMapbox ββResendββRazorβ
β(Data) ββ β(Maps) ββ(Emailββpay β
ββββββββββ β ββ ββ β
βββΌββββββββββββββββββββββ
User Registration/Login Request
β
ββ Option 1: Local (Email/Password)
β ββ Register β OTP Email β Verify β Account Created
β ββ Login β Validate Credentials β Session Created
β ββ Forgot Password β OTP Email β Reset β New Password
β
ββ Option 2: Google OAuth
β ββ Redirect to Google β User Approves β Get Auth Code
β ββ Exchange Code for Profile β Create/Update User
β ββ Session Created
β
ββ Option 3: GitHub OAuth
ββ Redirect to GitHub β User Approves β Get Auth Code
ββ Exchange Code for Profile β Create/Update User
ββ Session Created
β
βΌ
Passport.js Validation
β
βΌ
MongoDB User Document
β
βΌ
Express-session Created
β
βΌ
User Authenticated β
{ // Basic Information username: String (unique, required), email: String (unique, required), password: String (hashed with bcrypt), role: String (enum: ['user', 'admin'], default: 'user'), // Email Verification (OTP) otp: String (6-digit code), otpExpiry: Date (10-minute window), isEmailVerified: Boolean (email confirmation status), // Password Reset (OTP) resetOtp: String (6-digit code), resetOtpExpiry: Date (15-minute window), // OAuth Providers googleId: String (Google OAuth unique ID), githubId: String (GitHub OAuth unique ID), provider: String (enum: ['local', 'google', 'github']), // Profile Information profilePicture: String (URL from OAuth or upload), // Timestamps createdAt: Date, updatedAt: Date }
{ // Basic Information Name: String (business name), Category: String (category filter), description: String (business description), address: String (full address), // Location (GeoJSON for Mapbox) location: { type: Point, coordinates: [longitude, latitude] }, // Contact Information contactNumber: String, email: String, website: String (optional), // Images & Media Image: { public_id: String (Cloudinary ID), url: String (Cloudinary URL) }, // Ratings & Reviews avgRating: Number (average of all reviews), reviewCount: Number (total reviews), // Relationships Owner: ObjectId (Reference to User), reviews: [ObjectId] (Reference to Reviews), // Timestamps createdAt: Date, updatedAt: Date }
{ // Review Content content: String (review text), rating: Number (1-5 star rating), // References author: ObjectId (User who wrote review), business: ObjectId (Business being reviewed), // Metadata helpfulCount: Number (helpful votes), createdAt: Date, updatedAt: Date }
Registration Flow:
- User submits registration form (username, email, password, role)
- System generates 6-digit OTP and sends via Resend email service
- User receives email with OTP code
- User enters OTP on verification page
- System validates OTP and expiry (10 minutes)
- Account activated and user redirected to login
Key Features:
- 10-minute OTP expiry window
- Resend OTP functionality if needed
- Email validation before account creation
- Prevents spam registrations
- Secure Bcrypt password hashing
- Configuration: Google Cloud Console
- Callback URL:
http://localhost:3000/auth/google/callback - Scopes: profile, email
- Auto-Filled Data: Name, Email, Profile Picture
- Account Linking: Automatic email verification
- Configuration: GitHub Developer Settings
- Callback URL:
http://localhost:3000/auth/github/callback - Scopes: user:email
- Auto-Filled Data: Username, Email, Avatar
- Account Linking: Automatic email verification
Reset Flow:
- User clicks "Forgot Password" on login page
- Enters registered email address
- System generates 6-digit reset OTP
- OTP sent via email (15-minute expiry)
- User enters OTP and new password
- System validates OTP and password strength
- Password updated securely
- User can login with new password
Security Features:
- 15-minute OTP expiry
- Resend reset OTP functionality
- Password strength validation
- No direct email links (OTP-based)
- Secure password hashing
POST /register - Register new user with email
POST /verify-otp - Verify email with OTP code
POST /resend-otp - Resend OTP to email
GET /login - Display login page
POST /login - Local email/password login
GET /logout - Logout and destroy session
GET /forgot-password - Display forgot password form
POST /forgot-password - Send reset OTP to email
POST /reset-password - Reset password with OTP
POST /resend-reset-otp - Resend reset OTP
GET /auth/google - Redirect to Google OAuth
GET /auth/google/callback - Google OAuth callback handler
GET /auth/github - Redirect to GitHub OAuth
GET /auth/github/callback - GitHub OAuth callback handler
GET / - Home page with featured businesses
GET /discover - Browse all businesses
GET /show/:id - View business details
GET /new - Create business form
POST /create-business - Create new business listing
GET /edit/:id - Edit business form
PUT /update/:id - Update business information
DELETE /delete/:id - Delete business listing
GET /search - Search businesses by query
GET /business/:id - Business details page
POST /business/:id/reviews - Create review for business
PUT /reviews/:id - Edit review
DELETE /reviews/:id - Delete review
GET /reviews/:id - View review details
GET /dashboard - User dashboard
GET /profile - User profile page
PUT /profile/update - Update user profile
GET /favorites - View saved businesses
POST /favorites/:id - Save business to favorites
DELETE /favorites/:id - Remove from favorites
GET /messages - View all message threads
GET /messages/:id - View specific conversation
POST /messages/:id/send - Send message to business
GET /unread-count - Get unread message count
# ========================================== # DATABASE CONFIGURATION # ========================================== DB_URL=mongodb+srv://username:password@cluster.mongodb.net/findify_db # ========================================== # AUTHENTICATION - GOOGLE OAUTH # ========================================== GOOGLE_CLIENT_ID=your_google_client_id_here.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=your_google_client_secret_here # ========================================== # AUTHENTICATION - GITHUB OAUTH # ========================================== GITHUB_CLIENT_ID=your_github_client_id_here GITHUB_CLIENT_SECRET=your_github_client_secret_here # ========================================== # EMAIL SERVICE (RESEND) # ========================================== RESEND_API_KEY=re_your_resend_api_key_here # ========================================== # IMAGE STORAGE (CLOUDINARY) # ========================================== CLOUD_NAME=your_cloudinary_cloud_name CLOUD_API_KEY=your_cloudinary_api_key CLOUD_API_SECRET=your_cloudinary_api_secret # ========================================== # MAPS & GEOLOCATION (MAPBOX) # ========================================== MAP_ACCESS_TOKEN=pk.your_mapbox_access_token_here # ========================================== # PAYMENT PROCESSING (RAZORPAY) - OPTIONAL # ========================================== RAZORPAY_KEY_ID=your_razorpay_key_id_here RAZORPAY_KEY_SECRET=your_razorpay_key_secret_here # ========================================== # CHATBOT (OPENAI) - OPTIONAL # ========================================== CHATBOT=sk-proj-your_openai_api_key_here
- Hover Effects: Cards lift with smooth Y-axis translation
- Image Animation: 10% zoom with shimmer effect on hover
- Icon Animation: Color change to brand purple (#667eea)
- Text Transitions: Smooth fade-in animations
- Shadow Depth: Multi-layered shadows for 3D effect
- Glass-morphism: Modern backdrop blur effect
- Focus States: Purple glow on input focus
- Button Animation: Shine sweep effect on hover
- Responsive Layout: Stacks on mobile
- Smooth Transitions: Cubic-bezier easing
- Cubic-bezier Easing: Natural, smooth motion curves
- Page Load: Fade-in transition on page entry
- Icon Pulse: Subtle scale animation
- Button Ripple: Click feedback effect
- 60 FPS Performance: GPU-accelerated transforms
- Mobile Optimization: Touch-friendly sizes
- Adaptive Cards: Reduced hover effects on mobile
- Flexible Layout: Works on all screen sizes
- Image Optimization: Responsive image scaling
- Performance: Optimized for slow networks
- Node.js v22.13.1 or higher
- npm (comes with Node.js)
- MongoDB Atlas account (or local MongoDB)
- Git for version control
git clone https://github.com/aryaan022/Local-Business-Finder.git cd "Local Business Finder"
npm install
# Create .env file in root directory
cp .env.example .envEdit .env with your credentials (see Environment Configuration above)
Google OAuth:
- Go to Google Cloud Console
- Create new project
- Enable Google+ API
- Create OAuth 2.0 credentials (Web application)
- Add redirect URI:
http://localhost:3000/auth/google/callback - Copy Client ID & Secret to
.env
GitHub OAuth:
- Visit GitHub Developer Settings
- Click "New OAuth App"
- Set Authorization callback URL:
http://localhost:3000/auth/github/callback - Copy Client ID & Secret to
.env
Resend Email:
- Sign up at Resend.com
- Verify domain
- Generate API key
- Add to
.env
Mapbox:
- Create account at Mapbox
- Get access token from dashboard
- Add to
.env
Cloudinary:
- Sign up at Cloudinary
- Get API credentials
- Add to
.env
# Development with Nodemon (auto-reload) nodemon app.js # Or directly with Node node app.js # Application available at http://localhost:3000
β
Smooth hover effects on cards
β
Image zoom and shimmer on hover
β
Button shine animation
β
Icon pulse effects
β
Page load fade-in
β
Cubic-bezier easing
β
GPU-accelerated animations
β
Mobile-first approach
β
Touch-friendly interface
β
Adaptive card scaling
β
Flexible grid layouts
β
Optimized images
β
Focus states with glow effect
β
Hover state changes
β
Button ripple effect
β
Loading animations
β
Smooth transitions
nodemon app.js
NODE_ENV=production node app.js
- Heroku: Simple Git push deployment
- DigitalOcean: VPS with Node.js
- AWS: EC2 instances with load balancing
- Vercel: Serverless functions
- Railway: Modern deployment platform
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Make changes and test thoroughly
- Commit:
git commit -m "feat: add amazing feature" - Push:
git push origin feature/amazing-feature - Open Pull Request
- Follow existing code style
- Add meaningful comments
- Test new features
- Update documentation
- Use descriptive commit messages
MIT License - See LICENSE file for details.
Permission is granted to use, modify, and distribute this software freely.
Developer: Aryaan
GitHub: @aryaan022
Project: Local Business Finder
For issues and feature requests: GitHub Issues