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

https://github.com/talha-tahir2001/echo-backend

Your words, amplified.
https://github.com/talha-tahir2001/echo-backend

mongodb mongoose nestjs rest-api typescript

Last synced: about 2 months ago
JSON representation

Your words, amplified.

Awesome Lists containing this project

README

          


Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.



NPM Version
Package License
NPM Downloads
CircleCI
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective
Donate us
Support us
Follow us on Twitter



# ECHO Backend - NestJS πŸŽ™οΈ

ECHO is a **NestJS**-powered backend for a real-time discussion platform, allowing users to share thoughts, post comments, and interact seamlessly.

## πŸš€ Features
- πŸ›  **Modular architecture** - Organized and scalable
- πŸ” **JWT Authentication** - Secure login and session handling
- πŸ’Ύ **MongoDB with Mongoose** - Flexible NoSQL database
- πŸ“‘ **WebSockets** - Real-time messaging
- 🌍 **CORS Enabled** - Secure cross-origin communication
- πŸ“œ **Swagger API Documentation** - Easily test and explore endpoints

## πŸ—οΈ Installation

### Prerequisites
- **Node.js** (>= 18.x)
- **MongoDB Atlas** (or local MongoDB instance)
- **NestJS CLI** (`npm i -g @nestjs/cli`)

### Clone Repository
```sh
git clone https://github.com/Talha-Tahir2001/echo-backend.git
cd echo-backend
```

### Install Dependencies
```sh
npm install
```

### Configure Environment Variables
Create a `.env` file in the root directory:
```env
PORT=3000
MONGO_URI=your_mongodb_connection_string
```
## Compile and run the project

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Run tests

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## πŸ”₯ API Endpoints

### πŸ›  Authentication
| Method | Endpoint | Description |
|--------|---------|-------------|
| `POST` | `/users` | Register a new user |
| `GET` | `/users` | Get a user|

### πŸ’¬ Comments
| Method | Endpoint | Description |
|--------|---------|-------------|
| `GET` | `/comments` | Fetch all comments |
| `POST` | `/comments` | Create a new comment |
| `GET` | `/comments/:id` | Get a comment by ID|

πŸ“– Full API documentation available at `/api/docs` (Swagger UI).

## πŸ› οΈ Deployment
ECHO can be deployed to **Render, Railway, Vercel (API mode), or Fly.io**.

```sh
# Example: Deploying on Railway
railway init
railway up
```

## πŸ“œ License
This project is [MIT Licensed](https://github.com/Talha-Tahir2001/echo-backend/tree/main?tab=MIT-1-ov-file). Feel free to use and modify! ❀️

---
πŸ’‘ **Contributions & Suggestions Welcome!** PRs are encouraged to improve the project. πŸš€

## πŸ“‘Resources

Check out a few resources that may come in handy when working with NestJS:

- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
- For questions and support, please visit their [Discord channel](https://discord.gg/G7Qnnhy).
- To dive deeper and get more hands-on experience, check out their official video [courses](https://courses.nestjs.com/).
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
- Need help with your project (part-time to full-time)? Check out their official [enterprise support](https://enterprise.nestjs.com).
- To stay in the loop and get updates, follow them on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
- Looking for a job, or have a job to offer? Check out their official [Jobs board](https://jobs.nestjs.com).