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

https://github.com/hoangsonww/collabnote-fullstack-app

โœจ CollabNote is a full-stack note-taking app built with a modern NNS tech-stack: NestJS, Next.js, Vite, and Supabase, designed for collaborative note management. It features user authentication, note sharing, responsive design, and API documentation, making it an efficient and modern tool for organizing and sharing notes.
https://github.com/hoangsonww/collabnote-fullstack-app

apollo full-stack fullstack-development graphql nest nestjs nestjs-backend nextjs notes notes-app postgres postgresql react reactjs shadcn shadcn-ui sql supabase typescript vite

Last synced: 22 days ago
JSON representation

โœจ CollabNote is a full-stack note-taking app built with a modern NNS tech-stack: NestJS, Next.js, Vite, and Supabase, designed for collaborative note management. It features user authentication, note sharing, responsive design, and API documentation, making it an efficient and modern tool for organizing and sharing notes.

Awesome Lists containing this project

README

        

# CollabNote - A NestJS, Next.js, Vite, and Supabase Fullstack Notetaking App

[![NestJS](https://img.shields.io/badge/NestJS-v11.0.0-E0234E?style=for-the-badge&logo=nestjs)](https://nestjs.com/)
[![Next.js](https://img.shields.io/badge/Next.js-v12.0.7-000000?style=for-the-badge&logo=next.js)](https://nextjs.org/)
[![React](https://img.shields.io/badge/React-v17.0.2-61DAFB?style=for-the-badge&logo=react)](https://reactjs.org/)
[![Vite](https://img.shields.io/badge/Vite-v6.0.5-646CFF?style=for-the-badge&logo=vite)](https://vitejs.dev/)
[![Supabase](https://img.shields.io/badge/Supabase-v1.0.0-000000?style=for-the-badge&logo=supabase)](https://supabase.io/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-v15-336791?style=for-the-badge&logo=postgresql)](https://www.postgresql.org/)
[![Material UI](https://img.shields.io/badge/Material%20UI-v5.0.0-007FFF?style=for-the-badge&logo=mui)](https://mui.com/)
[![Swagger](https://img.shields.io/badge/Swagger-v4.1.6-85EA2D?style=for-the-badge&logo=swagger)](https://swagger.io/)
[![GraphQL](https://img.shields.io/badge/GraphQL-v15.5.0-E10098?style=for-the-badge&logo=graphql)](https://graphql.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.6.2-3178C6?style=for-the-badge&logo=typescript)](https://www.typescriptlang.org/)
[![Docker](https://img.shields.io/badge/Docker-v20.10.8-2496ED?style=for-the-badge&logo=docker)](https://www.docker.com/)
[![Nginx](https://img.shields.io/badge/Nginx-v1.21.4-269539?style=for-the-badge&logo=nginx)](https://nginx.org/)
[![Jenkins](https://img.shields.io/badge/Jenkins-v2.319-000000?style=for-the-badge&logo=jenkins)](https://www.jenkins.io/)

CollabNote is a collaborative notes platform designed to help you take, share, and manage notes effectively. It features a user-friendly interface, powerful backend APIs, and seamless deployment for both frontend and backend.

## Table of Contents
- [๐Ÿ’ก Features](#-features)
- [๐Ÿš€ Deployment](#-deployment)
- [๐ŸŽฏ Tech Stack](#-tech-stack)
- [๐Ÿ–ผ๏ธ UI Overview](#-ui-overview)
- [๐Ÿ“‚ Project Structure](#-project-structure)
- [๐Ÿ› ๏ธ Getting Started](#-getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Running Locally](#running-locally)
- [Using Docker](#using-docker)
- [๐Ÿ“– API Documentation](#-api-documentation)
- [API Endpoints](#api-endpoints)
- [Database Schema](#database-schema)
- [Detailed Guide for Using the `openapi.yaml` File](#detailed-guide-for-using-the-openapiyaml-file)
- [๐Ÿ–ฅ๏ธ GraphQL Integration](#-graphql-integration)
- [๐Ÿงฐ Nginx Configuration](#-nginx-configuration)
- [๐ŸŒ Kubernetes Deployment](#-kubernetes-deployment)
- [๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Continuous Integration and Deployment with Jenkins](#-continuous-integration-and-deployment-with-jenkins)
- [๐Ÿงช Testing](#-testing)
- [Backend Tests](#backend-tests)
- [Frontend Tests](#frontend-tests)
- [๐Ÿค Contributing](#-contributing)
- [๐Ÿ“„ License](#-license)
- [๐ŸŽ‰ Acknowledgments](#-acknowledgments)

## ๐Ÿ’ก Features

- **Authentication**: Secure user login, registration, and password management.
- **Notes Management**: Create, update, delete, and reorder notes.
- **Sharing**: Share notes with other users seamlessly.
- **Syncing**: Real-time syncing of notes across devices, and across users, thanks to Supabase.
- **Collaboration**: Collaborate with others on notes in real-time.
- **Search**: Search for notes by title or content.
- **User Profiles**: Manage and search user profiles.
- **Profile Settings**: Update user profile information.
- **Dark Mode**: Toggle between light and dark themes.
- **Testing**: Unit and integration tests for backend and frontend.
- **Responsive Design**: Works on all devices and screen sizes.
- **Swagger Documentation**: Comprehensive API documentation.
- **CI/CD Pipeline**: Jenkins pipeline for automated testing and deployment.

## ๐Ÿš€ Deployment

The app is deployed on Vercel for the frontend. You can access the live app at [CollabNote](https://collabnote-app.vercel.app/).

Additionally, the backend API is deployed on Render. You can access the API documentation at [CollabNote API](https://collabnote-fullstack-app.onrender.com/).

The backup frontend is also hosted on Netlify, which you can access at [CollabNote Netlify](https://notesapp-nestjs.netlify.app/).

> Note: The backend API may spin down due to inactivity. If you encounter any issues, please try again later. If inactive, the API may take a few seconds to start up, so frontend requests and Swagger may take some time to load initially.

> Important: Supabase may pause the app's database if it exceeds the free tier limits. Thus, if you are unable to log in or register, [let me know](mailto:[email protected]) and I will re-enable it (and it may take a while...)

## ๐ŸŽฏ Tech Stack

| Technology | Description |
|-----------------------------------------------|-------------------------------------|
| [NestJS](https://nestjs.com/) | Backend framework for scalable APIs |
| [Next.js](https://nextjs.org/) | React-based framework for SSR |
| [React](https://reactjs.org/) | Frontend library for building UI |
| [Vite](https://vitejs.dev/) | Frontend build tool |
| [Supabase](https://supabase.io/) | Backend-as-a-service for auth & DB |
| [PostgreSQL](https://www.postgresql.org/) | Database for storing app data |
| [TypeScript](https://www.typescriptlang.org/) | Type-safe development |
| [Swagger](https://swagger.io/) | API documentation and testing tool |
| [Docker](https://www.docker.com/) | Containerization for apps |
| [Nginx](https://nginx.org/) | Web server for load balancing |
| [Jenkins](https://www.jenkins.io/) | CI/CD tool for automated testing |
| [Render](https://render.com/) | Cloud platform for hosting apps |
| [Vercel](https://vercel.com/) | Cloud platform for frontend hosting |
| [GraphQL](https://graphql.org/) | Query language for APIs |

## ๐Ÿ–ผ๏ธ UI Overview

### Home Page


Login Page

### Home Page - Dark Mode


Login Page - Dark Mode

### Notes Dashboard


Notes Dashboard

### Notes Dashboard - Dark Mode


Notes Dashboard - Dark Mode

### Add Note Modal


Add Note Modal

### Note Details Modal


Note Details Page

### Note Editor


Note Editor

### Profile Page


Profile Page

### Profile Page - Dark Mode


Profile Page - Dark Mode

### Login Page


Login Page

### Login Page - Dark Mode


Login Page - Dark Mode

### Register Page


Register Page

### Register Page - Dark Mode


Register Page - Dark Mode

### Reset Password Page


Reset Password Page

### Reset Password Page - Dark Mode


Reset Password Page - Dark Mode

### API Documentation


Swagger Documentation

## ๐Ÿ“‚ Project Structure

```
DocuThinker-AI-App/
โ”œโ”€โ”€ backend/
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ auth/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth.module.ts # Authentication module
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth.controller.ts # Authentication controller
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth.service.ts # Authentication service
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth.schema.ts # Authentication schema
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth.resolver.ts # Authentication resolver
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ jwt.strategy.ts # JWT authentication strategy
โ”‚ โ”‚ โ”œโ”€โ”€ dto/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ create-note.input.ts # Create note DTO
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ update-note.input.ts # Update note DTO
โ”‚ โ”‚ โ”œโ”€โ”€ notes/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ notes.schema.ts # Notes schema
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ notes.resolver.ts # Notes resolver
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ notes.module.ts # Notes module
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ notes.controller.ts # Notes controller
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ notes.service.ts # Notes service
โ”‚ โ”‚ โ”œโ”€โ”€ profile/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile.schema.ts # Profile schema
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile.resolver.ts # Profile resolver
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile.module.ts # Profile module
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile.controller.ts # Profile controller
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ profile.service.ts # Profile service
โ”‚ โ”‚ โ”œโ”€โ”€ supabase/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ supabase.module.ts # Supabase module
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ supabase.service.ts # Supabase service
โ”‚ โ”‚ โ”œโ”€โ”€ types/
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ authenticated-request.ts # Authenticated user type
โ”‚ โ”‚ โ”œโ”€โ”€ schema.gql # GraphQL schema
โ”‚ โ”‚ โ”œโ”€โ”€ app.module.ts # Main app module
โ”‚ โ”‚ โ”œโ”€โ”€ app.test.ts # App test file
โ”‚ โ”‚ โ””โ”€โ”€ main.ts # Main entry point for the backend
โ”‚ โ”œโ”€โ”€ .env # Environment variables (git-ignored)
โ”‚ โ”œโ”€โ”€ build-backend.sh # Shell script to build the backend
โ”‚ โ”œโ”€โ”€ Dockerfile # Docker configuration file
โ”‚ โ”œโ”€โ”€ docker-compose.yml # Docker Compose file for the backend
โ”‚ โ”œโ”€โ”€ package.json # Project dependencies and scripts
โ”‚ โ”œโ”€โ”€ package-lock.json # Lock file for dependencies
โ”‚ โ”œโ”€โ”€ tsconfig.json # TypeScript configuration file
โ”‚ โ””โ”€โ”€ vercel.json # Vercel configuration file
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚ โ”œโ”€โ”€ public/
โ”‚ โ”‚ โ”œโ”€โ”€ favicon.ico # Favicon for the app
โ”‚ โ”‚ โ”œโ”€โ”€ (other images...) # Other images used in the app
โ”‚ โ”‚ โ”œโ”€โ”€ index.html # Main HTML template
โ”‚ โ”‚ โ””โ”€โ”€ manifest.json # Manifest for PWA settings
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ assets/ # Static assets like images and fonts
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ logo.png # App logo or images
โ”‚ โ”‚ โ”œโ”€โ”€ components/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ LoadingOverlay.tsx # Loading overlay component
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ PasswordField.tsx # Password field component
โ”‚ โ”‚ โ”œโ”€โ”€ layout/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ResponsiveDrawer.tsx # Responsive drawer component
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Footer.tsx # Footer component
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Layout.tsx # Main layout component
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ Navbar.tsx # Navbar component
โ”‚ โ”‚ โ”œโ”€โ”€ routes/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ForgotPasswordPage.tsx # Forgot password page
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ HomePage.tsx # Home page
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ LoginPage.tsx # Login page
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ NoteDetailsPage.tsx # Note details page
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ NotesPage.tsx # Notes dashboard page
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ProfilePage.tsx # Profile page
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ RegisterPage.tsx # Register page
โ”‚ โ”‚ โ”œโ”€โ”€ theme/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ index.ts # Theme configuration
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ThemeContext.tsx # Theme context provider
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ThemeProviderWrapper.tsx # Theme provider wrapper
โ”‚ โ”‚ โ”œโ”€โ”€ App.tsx # Main App component
โ”‚ โ”‚ โ”œโ”€โ”€ App.test.tsx # App test file
โ”‚ โ”‚ โ”œโ”€โ”€ App.css # Global CSS 1
โ”‚ โ”‚ โ”œโ”€โ”€ index.css # Global CSS 2
โ”‚ โ”‚ โ”œโ”€โ”€ main.tsx # Main entry point for the frontend
โ”‚ โ”‚ โ””โ”€โ”€ vite-env.d.ts # Vite environment types
โ”‚ โ”œโ”€โ”€ .gitignore # Git ignore file
โ”‚ โ”œโ”€โ”€ package.json # Project dependencies and scripts
โ”‚ โ”œโ”€โ”€ package-lock.json # Lock file for dependencies
โ”‚ โ”œโ”€โ”€ Dockerfile # Docker configuration file
โ”‚ โ”œโ”€โ”€ docker-compose.yml # Docker Compose file for the frontend
โ”‚ โ”œโ”€โ”€ index.html # Main HTML template
โ”‚ โ”œโ”€โ”€ build-frontend.sh # Shell script to build the frontend
โ”‚ โ”œโ”€โ”€ vercel.json # Vercel configuration file
โ”‚ โ”œโ”€โ”€ vite.config.ts # Vite configuration file
โ”‚ โ”œโ”€โ”€ tsconfig.app.json # TypeScript configuration file for the app
โ”‚ โ”œโ”€โ”€ tsconfig.node.json # TypeScript configuration file for Node
โ”‚ โ””โ”€โ”€ tsconfig.json # TypeScript configuration file
โ”‚
โ”œโ”€โ”€ kubernetes/ # Kubernetes configuration files
โ”‚ โ”œโ”€โ”€ backend-deployment.yaml # Deployment configuration for the backend
โ”‚ โ”œโ”€โ”€ backend-service.yaml # Service configuration for the backend
โ”‚ โ”œโ”€โ”€ frontend-deployment.yaml # Deployment configuration for the frontend
โ”‚ โ”œโ”€โ”€ frontend-service.yaml # Service configuration for the frontend
โ”‚ โ””โ”€โ”€ configmap.yaml # ConfigMap configuration for environment variables
โ”‚
โ”œโ”€โ”€ nginx/
โ”‚ โ”œโ”€โ”€ start_nginx.sh # Shell script to start NGINX
โ”‚ โ”œโ”€โ”€ nginx.conf # NGINX configuration file for load balancing and caching
โ”‚ โ”œโ”€โ”€ docker-compose.yml # Docker Compose file for NGINX
โ”‚ โ””โ”€โ”€ Dockerfile # Docker configuration file for NGINX
โ”‚
โ”œโ”€โ”€ images/ # Images for the README
โ”œโ”€โ”€ .env # Environment variables file for the whole app
โ”œโ”€โ”€ docker-compose.yml # Docker Compose file for containerization
โ”œโ”€โ”€ package.json # Project dependencies and scripts
โ”œโ”€โ”€ package-lock.json # Lock file for dependencies
โ”œโ”€โ”€ vercel.json # Vercel configuration file
โ”œโ”€โ”€ openapi.yaml # OpenAPI specification for API documentation
โ”œโ”€โ”€ jenkins_cicd.sh # Shell script for managing the Jenkins CI/CD pipeline
โ”œโ”€โ”€ .gitignore # Git ignore file
โ”œโ”€โ”€ LICENSE # License file for the project
โ”œโ”€โ”€ README.md # Comprehensive README for the whole app
โ””โ”€โ”€ (and many more files...) # Additional files and directories not listed here
```

## ๐Ÿ› ๏ธ Getting Started

Follow these steps to set up the project on your local machine.

### Prerequisites

Ensure you have the following installed:
- **Node.js**: v18 or above
- **npm**: v9 or above
- **PostgreSQL**: v15 or above
- **Docker** (Optional)

### Installation

1. **Clone the Repository**:
```bash
git clone https://github.com/hoangsonww/CollabNote-Fullstack-App.git
cd CollabNote-Fullstack-App
```

2. **Set Up Backend**:
```bash
cd backend
npm install
```

3. **Set Up Frontend**:
```bash
cd ../frontend
npm install
```

4. **Configure Environment Variables**:
- Create `.env` files in the `backend` and `frontend` directories.
- For **backend** (`backend/.env`):
```env
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_supabase_service_key
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=jwt_expiry_time(eg. 1d)
PORT=4000
```
- For **frontend** (`frontend/.env`):
```env
VITE_API_URL=http://localhost:4000
```

### Running Locally

1. **Start the Backend**:
```bash
cd backend
npm run start:dev
```

2. **Start the Frontend**:
```bash
cd ../frontend
npm run dev
```

3. Open your browser:
- **Frontend**: [http://localhost:5172](http://localhost:5172) or your selected Vite port
- **Backend**: [http://localhost:4000](http://localhost:4000)
- **Swagger**: [http://localhost:4000/api](http://localhost:4000/api)

### Using Docker

1. **Build and Run Docker Containers**:
```bash
docker-compose up --build
```

2. **Access the Services**:
- Backend: [http://localhost:4000](http://localhost:4000)
- Frontend: [http://localhost:3000](http://localhost:3000)

## ๐Ÿ“– API Documentation

All APIs are documented in Swagger. Access the documentation at [http://localhost:4000/api](http://localhost:4000/api).

### API Endpoints

| Method | Endpoint | Description |
|--------|----------------------------|-------------------------------------------|
| POST | `/auth/register` | Register a new user |
| POST | `/auth/login` | Login an existing user |
| POST | `/auth/check-email-exists` | Check if an email exists |
| POST | `/auth/reset-password` | Reset a user's password |
| GET | `/notes` | Retrieve user notes |
| POST | `/notes` | Create a new note |
| PATCH | `/notes/{id}` | Update a note |
| DELETE | `/notes/{id}` | Delete a note |
| POST | `/notes/{id}/share` | Share a note with another user |
| POST | `/notes/reorder` | Reorder user notes |
| GET | `/profile/me` | Retrieve the authenticated user's profile |
| GET | `/profile/userId/{id}` | Retrieve a user profile by ID |
| GET | `/profile/search` | Search for a user profile by username |
| PATCH | `/profile/me` | Update the authenticated user's profile |

### Database Schema

The database schema consists of the following tables:


Database Schema

Note the `user_id` foreign key relationship between the `notes` and `users` tables. Additionally, more tables will be added as the app grows in the future!

### Detailed Guide for Using the `openapi.yaml` File

1. **View the API Documentation**

- Open [Swagger Editor](https://editor.swagger.io/).
- Upload the `openapi.yaml` file or paste its content.
- Visualize and interact with the API documentation.

2. **Test the API**

- Import `openapi.yaml` into [Postman](https://www.postman.com/):
- Open Postman โ†’ Import โ†’ Select `openapi.yaml`.
- Test the API endpoints directly from Postman.
- Or use [Swagger UI](https://swagger.io/tools/swagger-ui/):
- Provide the file URL or upload it to view and test endpoints.

3. **Generate Client Libraries**

- Install OpenAPI Generator:
```bash
npm install @openapitools/openapi-generator-cli -g
```
- Generate a client library:
```bash
openapi-generator-cli generate -i openapi.yaml -g -o ./client
```
- Replace `` with the desired programming language.

4. **Generate Server Stubs**

- Generate a server stub:
```bash
openapi-generator-cli generate -i openapi.yaml -g -o ./server
```
- Replace `` with the desired framework.

5. **Run a Mock Server**

- Install Prism:
```bash
npm install -g @stoplight/prism-cli
```
- Start the mock server:
```bash
prism mock openapi.yaml
```

6. **Validate the OpenAPI File**

- Use [Swagger Validator](https://validator.swagger.io/):
- Upload `openapi.yaml` or paste its content to check for errors.

This guide enables you to view, test, and utilize the API.

## **๐Ÿ–ฅ๏ธ GraphQL Integration**

The CollabNote API also supports GraphQL for querying and manipulating data.

To access, navigate to [https://collabnote-fullstack-app.onrender.com/graphql](https://collabnote-fullstack-app.onrender.com/graphql) and use the GraphQL Playground to interact with the API.

Alternatively, you can start a local backend server following the steps above and access the GraphQL Playground at [http://localhost:4000/graphql](http://localhost:4000/graphql).

You should see something like this:


GraphQL Playground

You can query something like this:

```graphql
query {
getUserNotes(userId: 1, searchQuery: "", tagFilter: "") {
id
title
content
tags
dueDate
color
pinned
sharedWithUserIds
sortOrder
username
}
}
```

This query fetches all notes for a user with ID 1. You can modify the query to suit your needs.

Feel free to explore the GraphQL API and test different queries and mutations! Consult the [GraphQL documentation](https://graphql.org/learn/) for more information.

## **๐Ÿงฐ Nginx Configuration**

- The `nginx` directory contains an Nginx configuration for reverse proxy and load balancing.
- Use Nginx to route requests to multiple instances of the API.
- Configure SSL termination and caching for improved performance.
- The Nginx configuration looks like this:

```nginx
server {
listen 80;
server_name localhost;

location / {
proxy_pass http://localhost:3000;
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;
}
}
```

- For more information, refer to the [Nginx documentation](https://nginx.org/en/docs/) and the [Nginx Directory](nginx/README.md).

## **๐ŸŒ Kubernetes Deployment**

1. Create Kubernetes manifests for the services.
2. Deploy to a cluster:
```bash
kubectl apply -f kubernetes/
```

3. Access the application using the service URL.

## **๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Continuous Integration and Deployment with Jenkins**

The CollabNote API also includes a Jenkins pipeline for continuous integration and deployment.

1. **Pipeline Configuration:** The `Jenkinsfile` defines the CI/CD pipeline stages, including code checkout, dependency installation, testing, building, and deployment. Add it to the root of the project.

2. **Job Setup:** Create a pipeline job in Jenkins, point it to the repository, and configure it to use the `Jenkinsfile`.

3. **Automated Testing:** The pipeline runs `npm test` to ensure all tests pass before proceeding to the build or deployment stages.

4. **Environment Variables:** Use Jenkins environment variables to securely manage secrets like API keys and credentials for services such as MongoDB, Redis, or Render.

5. **Deployment:** The pipeline supports deploying the application using Render or directly to a server using SSH and PM2.

6. **Webhooks:** Integrate GitHub/GitLab webhooks to trigger builds automatically on code changes.

7. **Notifications:** Add Slack or email notifications in the pipeline to inform team members about build and deployment statuses.

## ๐Ÿงช Testing

We also feature Jest unit and integration tests for both the backend and frontend. Run the tests to ensure the app functions as expected.

### Backend Tests
```bash
cd backend
npm run test
```

### Frontend Tests
```bash
cd frontend
npm run test
```

## ๐Ÿค Contributing

Contributions are welcome! Please fork the repository and create a pull request.

## ๐Ÿ“„ License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

## ๐ŸŽ‰ Acknowledgments

- **Son Nguyen**: Creator and maintainer of CollabNote.
- **NestJS, Next.js, React, Vite**: The tech stack that powers this project.

---

Thank you for visiting CollabNote today! **Happy notetaking!** ๐Ÿ“๐Ÿš€

[๐Ÿ” Back to Top](#collabnote---a-nestjs-nextjs-vite-and-supabase-fullstack-notetaking-app)