Skip to content
/ SNet-Backend Public template

πŸš€ Project: Social Network 🌐 Tech Stack: NestJS πŸ—, FastAPI ⚑, PostgreSQL πŸ›’, MongoDB πŸƒ, Elasticsearch πŸ”Ž, KibanaπŸ—, Redis πŸ”₯, BullMQ πŸ“¨, Mailer βœ‰οΈ, Faiss 🧠, Yolo 🎯

Notifications You must be signed in to change notification settings

ntthanh2603/SNet-Backend

Repository files navigation

SNet - Modern Social Network Platform

NPM Version Package License NPM Downloads CircleCI Discord

πŸš€ Overview

SNet is a powerful social networking platform built on modern technologies. The project leverages NestJS as its primary framework for building a scalable and efficient backend, with FastAPI serving as a secondary framework for AI-powered features and API processing.

πŸ”§ Tech Stack

Core Technologies

  • NestJS: Primary backend framework
  • FastAPI: Secondary framework for AI models and API processing
  • PostgreSQL: Main database
  • Redis: In-memory database for caching and real-time features
  • BullMQ: Queue system for background job processing
  • Elasticsearch: Search engine for content indexing
  • FAISS: Vector similarity search for AI features

πŸ—‚οΈ Project Structure

β”œβ”€β”€ src/                    # Backend system
β”œβ”€β”€ model-ai/               # Models AI use FastAPI, Huggingface, Faiss...
β”œβ”€β”€ docs/                   # Documents for project and images for README.md
β”œβ”€β”€ public/                 # Data images/videos of app
β”œβ”€β”€ test/                   # Files test app
β”œβ”€β”€ docker-compose.yaml     # Manager containers
β”œβ”€β”€ README.md               # Project documentation (this file)
└── .gitignore              # Block files when push github

βš™οΈ Installation and Setup

Using Docker (Recommended)

# Create and run all services
docker-compose up

# To shut down and remove volumes
docker-compose down -v

Manual Setup

# Install dependencies
npm install --legacy-peer-deps

# Development mode with hot-reload
npm run dev

πŸ”„ Architecture

SNet follows a microservices architecture:

  1. NestJS Backend: Handles core application logic, authentication, and main API endpoints
  2. FastAPI Services: Process AI-related tasks and specialized API endpoints
  3. Database Layer: PostgreSQL for persistent storage, Redis for caching
  4. Search Services: Elasticsearch for content search, FAISS for AI vector similarity search
  5. Background Processing: BullMQ for handling asynchronous tasks

πŸ§ͺ Testing

# Unit tests
npm run test

# E2E tests
npm run test:e2e

# Test coverage
npm run test:cov

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ’¬ Support

If you encounter any issues or need support, please reach out:

πŸ“œ License

SNet is MIT licensed.

Thanks for watching

About

πŸš€ Project: Social Network 🌐 Tech Stack: NestJS πŸ—, FastAPI ⚑, PostgreSQL πŸ›’, MongoDB πŸƒ, Elasticsearch πŸ”Ž, KibanaπŸ—, Redis πŸ”₯, BullMQ πŸ“¨, Mailer βœ‰οΈ, Faiss 🧠, Yolo 🎯

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published