An open API service indexing awesome lists of open source software.

https://github.com/pavansingh888/devbond-webapp

Frontend service of DevBond application built using React, Tailwind, DaisyUI etc.
https://github.com/pavansingh888/devbond-webapp

axios-react daisyui javascript react-components react-hooks react-redux react-router react-router-dom reactjs redux redux-toolkit socket-io-client tailwindcss validatorjs vite-react

Last synced: about 1 month ago
JSON representation

Frontend service of DevBond application built using React, Tailwind, DaisyUI etc.

Awesome Lists containing this project

README

          

# ๐Ÿš€ 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

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

### 2. Install Dependencies

```bash
npm install
```

### 3. Run the App Locally

```bash
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

```jsx


}>
}>
}>
}>
}>
}>
}>
}>
}>



```

---

## ๐Ÿ”’ 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:

```bash
npm run build
```

2. Copy `dist` to EC2:

```bash
scp -r dist/* ubuntu@:/var/www/html/
```

3. Configure Nginx:

```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;
}
}
```

4. Restart Nginx:

```bash
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

```env
VITE_API_BASE_URL=http://devbond.com/api
```

Make sure to **not commit** your `.env` file.
---

## ๐Ÿ™Œ Contributors

- [Pavan Singh](https://github.com/pavansingh888)

---

## ๐Ÿ“„ License

This project is licensed under the [MIT License](LICENSE).