๐Ÿš€ DevBond โ€” Frontend

DevBond is a full-stack social networking platform built using the MERN stack. This repository contains the frontend application built with Vite + React, styled using Tailwind CSS and Daisy UI, featuring real-time chat, profile management, social connections, and more.


๐Ÿ› ๏ธ Tech Stack

  • React (Vite)
  • Tailwind CSS + Daisy UI
  • React Router
  • Redux Toolkit
  • Axios
  • Socket.IO Client

๐Ÿ“ฆ Project Setup

1. Clone the Repository

git clone https://github.com/pavansingh888/DevBond-WebApp.git
cd devbond-web

2. Install Dependencies

npm install

3. Run the App Locally

npm run dev

โœจ Key Features

  • โœ… Hello World setup via Vite
  • ๐ŸŽจ Styled with Tailwind CSS + Daisy UI
  • ๐Ÿงญ Routing using React Router
  • ๐Ÿ” Login, Signup & Protected Routes
  • ๐Ÿ“ฅ Axios API calls with withCredentials: true
  • ๐Ÿ”„ Redux Toolkit for state management
  • ๐Ÿ”” Toast notifications on profile updates
  • ๐Ÿค Social Connection Requests (Send, Accept, Reject)
  • ๐Ÿงพ Feed with user cards
  • โœ๏ธ Edit Profile
  • ๐Ÿ”„ Logout + Session Persistence
  • ๐Ÿ”— View Connections & Requests
  • ๐Ÿ’ฌ Real-time Chat via WebSockets
  • ๐Ÿ’ฐ Razorpay Integration for Premium Users
  • ๐Ÿ“ง Email Notifications using Amazon SES
  • ๐Ÿ“† Scheduled Cron Jobs via Node for daily email reports

๐Ÿงญ Routes Overview

<BrowserRouter>
        <Routes>
          <Route path="/" element={<Body />}>
            <Route path="/" element={<Feed/>}></Route>
            <Route path="/chat/:targetUserId" element={<Chat/>}></Route>
            <Route path="/premium" element={<Premium/>}></Route>
            <Route path="/login" element={<Login />}></Route>
            <Route path="/profile" element={<Profile />}></Route>
            <Route path="/connections" element={<Connections />}></Route>
            <Route path="/requests" element={<Requests/>}></Route>
            <Route path="/error" element={<ErrorPage/>}></Route>
          </Route>
        </Routes>
      </BrowserRouter>

๐Ÿ”’ Authentication Guard

  • Unauthenticated users are redirected to /login.
  • Token is required for accessing protected routes.

๐Ÿงช E2E Testing

Full end-to-end test cases are implemented to verify flows like:

  • Signup
  • Login
  • Edit Profile
  • Connection Requests
  • Payment Flow
  • Real-time Messaging

๐Ÿš€ Deployment (Frontend on AWS EC2)

  1. Build the project:
npm run build
  1. Copy dist to EC2:
scp -r dist/* ubuntu@<your-ec2-ip>:/var/www/html/
  1. Configure Nginx:
server {
  listen 80;
  server_name DevBond.com;

  root /var/www/html;
  index index.html;

  location /api/ {
    proxy_pass http://localhost:7777/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}
  1. Restart Nginx:
sudo systemctl restart nginx

๐ŸŒ Domain Setup via Cloudflare

  • Purchase domain (e.g. from GoDaddy)
  • Point nameservers to Cloudflare

๐Ÿ“ง Amazon SES for Emails

  • Create IAM User with SES Access
  • Setup domain & email identity
  • Use AWS SDK (v3)
  • Store keys in .env:
    AWS_ACCESS_KEY=
    AWS_SECRET_KEY=
    
  • Setup SesClient & dynamic send email function

โฐ Cron Jobs

  • Use node-cron
  • Daily scheduled emails to users with pending requests

๐Ÿ’ธ Razorpay Integration

  • Razorpay Order creation from frontend
  • Webhook setup to capture payment success
  • Store transactions in DB
  • Use keys from .env

๐Ÿ’ฌ Real-Time Chat (Socket.IO)

  • Route: /chat/:targetUserId
  • Green indicator for online users
  • "Last seen" status
  • Auth checks for socket connections

๐Ÿ“ .env Example

VITE_API_BASE_URL=http://devbond.com/api

Make sure to not commit your .env file.

๐Ÿ™Œ Contributors


๐Ÿ“„ License

This project is licensed under the MIT License.

Top categories

Loading Svelte Themes