Skip to content

LaGodxy/gg_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gasless Gossip Backend

Gasless Gossip is an on-chain chat application that enables users to send and receive messages along with tokens without gas fees. This backend is built using NestJS and MongoDB, providing a scalable and efficient API for the application.

πŸš€ Features

  • User Authentication & Authorization (JWT-based)
  • Real-time Chat using WebSockets
  • On-chain Transaction Integration
  • Message Encryption & Security
  • MongoDB Database with Mongoose ODM
  • Modular & Scalable NestJS Architecture

πŸ›  Tech Stack

  • Framework: NestJS
  • Database: MongoDB
  • WebSockets: Built-in NestJS Gateway
  • Blockchain: Starknet Integration (Planned)
  • Authentication: JWT-based authentication
  • Environment Management: dotenv

πŸ“‚ Project Structure

πŸ“¦ gasless-gossip-backend
 ┣ πŸ“‚ src
 ┃ ┣ πŸ“‚ auth       # Authentication & Authorization
 ┃ ┣ πŸ“‚ chat       # Chat module (WebSockets & Messaging)
 ┃ ┣ πŸ“‚ users      # User management
 ┃ ┣ πŸ“‚ common     # Shared utilities & DTOs
 ┃ ┣ πŸ“‚ config     # Configurations
 ┃ ┣ πŸ“‚ database   # MongoDB connection setup
 ┃ ┣ πŸ“œ main.ts    # Entry point
 ┃ β”— ...
 ┣ πŸ“œ .env.example # Environment variables template
 ┣ πŸ“œ README.md    # Project documentation
 β”— πŸ“œ package.json # Dependencies

πŸ— Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/your-repo/gasless-gossip-backend.git
cd gasless-gossip-backend

2️⃣ Install Dependencies

npm install

3️⃣ Configure Environment Variables

Copy the .env.example file and create a .env file:

cp .env.example .env

Then, update the required environment variables.

4️⃣ Start the Server

Development Mode

npm run start:dev

Production Mode

npm run build
npm run start:prod

πŸ”— API Endpoints

Method Endpoint Description
POST /auth/signup Register a new user
POST /auth/login Authenticate user
GET /users/:id Get user details
GET /chat/messages Fetch chat messages
POST /chat/send Send a new message

πŸ§ͺ Testing

Run unit tests using:

npm run test

Run end-to-end (e2e) tests:

npm run test:e2e

🀝 Contribution

  1. Fork the repository.
  2. Create a new feature branch: git checkout -b feature-branch
  3. Commit your changes: git commit -m 'Add new feature'
  4. Push to the branch: git push origin feature-branch
  5. Open a Pull Request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •