Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sinanptm/url-shortener
My First nestjs project
https://github.com/sinanptm/url-shortener
mern-stack nesjs nestjs-backend node-js url-shortner
Last synced: 10 days ago
JSON representation
My First nestjs project
- Host: GitHub
- URL: https://github.com/sinanptm/url-shortener
- Owner: sinanptm
- Created: 2024-10-15T16:25:29.000Z (24 days ago)
- Default Branch: main
- Last Pushed: 2024-10-22T04:02:10.000Z (18 days ago)
- Last Synced: 2024-10-23T06:12:50.802Z (17 days ago)
- Topics: mern-stack, nesjs, nestjs-backend, node-js, url-shortner
- Language: TypeScript
- Homepage: https://url-shortener-sooty-five.vercel.app
- Size: 282 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
URL Shortener - MERN Stack with NestJS Backend
A powerful and efficient URL shortener built with the MERN stack, featuring a NestJS backend for robust server-side operations.
Features •
Tech Stack •
Getting Started •
Usage •
Learning NestJS •
Contributing •
## Features
- 🚀 Shorten long URLs into easily shareable links
- 📊 Track click statistics for each shortened URL
- 🔒 User authentication and personalized dashboard
- 🎨 Responsive and intuitive user interface
- ⚡ High-performance backend powered by NestJS## Tech Stack
- **Frontend**: React, Redux, Tailwind CSS
- **Backend**: NestJS (Node.js framework), Express.js
- **Database**: MongoDB
- **Authentication**: JWT## Learning NestJS
As a NestJS beginner, I am discovering how it differs from traditional Node.js frameworks like Express. With its modular architecture and TypeScript-first approach, NestJS makes it easier to build scalable and testable backend services. I chose NestJS for this project to gain hands-on experience in building a more structured backend.
Some key aspects I'm exploring with NestJS in this project:
- Modular architecture
- Dependency injection
- Decorators for routing and request handling
- Integration with MongoDB using Mongoose
- Authentication and authorization with GuardsTo learn more about NestJS, check out the [official documentation](https://docs.nestjs.com/).
## Getting Started
1. Clone the repository:
```bash
git clone https://github.com/yourusername/url-shortener.git
cd url-shortener
```2. Install dependencies for both client and server:
```bash
# Install client dependencies
cd client
npm install# Install server dependencies
cd ../server
npm install
```3. Set up environment variables:
Create a `.env` file in the server directory and add the following:
```
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:300
```4. Start the development servers:
```bash
# Start the NestJS backend server
cd server
npm run start:dev# In a new terminal, start the React frontend
cd client
npm start
```