O-shortener is used to make short urls
POST /auth/signup
: Create a new UserGET /:short_code
: Redirect to the original URL based on the provided short code.
For detailed documentation and examples, refer to the API Documentation file.
1- clone the Repo
git clone https://github.com/omarsabra1/O-shortener
cd o-shortener
npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
src
│ ├── main.ts
│ ├── app.controller.spec.ts
│ ├── app.controller.ts
│ ├── auth
│ │ ├── Dtos
│ │ ├── auth.module.ts
│ │ ├── controllers
│ │ ├── guard
│ │ │ └── auth
│ │ │ └── auth.guard.ts
│ │ ├── service
│ │ └── utils
│ ├── prismaService
│ └── urls
│ ├── controller
│ │ ├── Dtos
│ │ └── urls.controller.ts
│ ├── service
│ ├── urls.module.ts
│ └── utils
NOTE : The controller mange the routes only but the services for business logic and connecting With ORM
main.ts
: The entry point of the application.urls/controller/urls.controller.ts
: Handles the creation of shortened URLs.prismaService
: is used to connect Prisma Client.app.controller.ts
: Handles the redirection to the original URLs.auth/controller/auth.controller.ts
: Handles Authentication and creating userauth/guard/auth/auth.guard.ts
: verifying JWT Token
O-shortener under the MIT licensed.