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.
- Host: GitHub
- URL: https://github.com/talha-tahir2001/echo-backend
- Owner: Talha-Tahir2001
- License: mit
- Created: 2025-02-26T19:35:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-25T18:53:20.000Z (over 1 year ago)
- Last Synced: 2025-03-29T09:18:31.472Z (about 1 year ago)
- Topics: mongodb, mongoose, nestjs, rest-api, typescript
- Language: TypeScript
- Homepage:
- Size: 341 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A progressive Node.js framework for building efficient and scalable server-side applications.
# 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).