This project is a SaaS CRM solution that provides a comprehensive suite of tools to manage client interactions and streamline operations. The key features include viewing upcoming bookings, tracking users via tagged links, writing session notes, accessing analytical data, and handling payments.
- Viewing Upcoming Bookings: Allows users to see their upcoming appointments and manage their schedules.
- Tracking Users via Tagged Links: Monitors the number of users arriving via specific links.
- Writing Session Notes: Enables users to document notes for each session.
- Accessing Analytical Data: Provides insights such as session frequency and monthly turnover.
- Handling Payments: Manages payment collection and deposits into client accounts.
Frontend:
- React.js
- HTML, CSS
- Axios (for API calls)
Backend:
- Node.js
- Express.js
- MongoDB
- Mongoose (ORM)
Payment Gateway:
- Stripe API
Analytics and Tracking:
- Google Analytics
- Firebase
DevOps:
- Docker
- Kubernetes
- GitHub Actions (CI/CD)
Testing:
- Jest
- Cypress
root
│
├── backend
│ ├── controllers
│ ├── models
│ ├── routes
│ ├── services
│ └── index.js
│
├── frontend
│ ├── src
│ │ ├── components
│ │ ├── pages
│ │ ├── services
│ │ └── App.js
│ └── public
│
├── .gitignore
├── docker-compose.yml
├── README.md
└── package.json
- Node.js (v14 or higher)
- MongoDB
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/your-repo/saas-crm.git cd saas-crm
-
Install dependencies:
- For backend:
cd backend npm install
- For frontend:
cd frontend npm install
- For backend:
-
Configure environment variables:
- Create a
.env
file in thebackend
directory and add the following:PORT=5000 MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret STRIPE_SECRET_KEY=your_stripe_secret_key
- Create a
-
Run the application:
- Using Docker Compose:
docker-compose up
- Without Docker:
- Start the backend:
cd backend npm start
- Start the frontend:
cd frontend npm start
- Start the backend:
- Using Docker Compose:
-
Component Structure:
- Login Component: Handles user authentication.
- Navbar Component: Navigation bar for accessing different pages.
- Bookings Component: Main component for displaying bookings.
- Booking Card Component: Displays individual booking details.
- Error Handling Component: Displays errors if any occur.
-
API Integration:
- Use Axios to fetch data from the backend.
- Handle API responses and errors.
-
Setting Up Server:
- Initialize a Node.js server with Express.
- Configure middleware for authentication and error handling.
-
Controllers and Services:
- Create controllers for handling requests.
- Implement business logic in service layers.
-
Database Schema:
- Design schemas using Mongoose for MongoDB.
- Implement CRUD operations.
- Get Upcoming Bookings:
- Endpoint:
/api/bookings
- Method: GET
- Description: Fetches a list of upcoming bookings.
- Response:
{ "bookings": [ { "id": "1", "user": "Sagar Gaud", "service": "Consultation", "date": "2024-07-01T10:00:00Z", "status": "Confirmed" }, ... ] }
- Endpoint:
- Use Jest for unit testing frontend and backend components.
- Write tests for individual components and services.
- Use Cypress for end-to-end testing.
- Test the integration between frontend and backend.
-
Frontend:
cd frontend npm test
-
Backend:
cd backend npm test