TinyURLs is an app that allows users to shorten long URLs.
This project's goal is to revisit an old project made with Node JS, Express and EJS templates: TinyApp, and rebuild it using TypeScript, React JS and Express.
- Learn TypeScript.
- Learn how to use TypeScript with React.
- Learn how to pass down and handle props with TypeScript.
- Learn how to manage state with TypeScript.
The ERD is in the back-end folder.
- A user can generate a short URL by submitting a long URL.
- They can login or register to save their generated tiny URLs.
- They can delete or edit the URLs.
- They can see how many times their tiny URL was clicked.
- When they click on a tiny URL, they're redirected to its long URL.
- They can see how many times the URL was clicked and when was the last visit.
Since the project is limited in scope, I decided to include some tests for different parts of the app.
The result of these tests is 100% coverage.
- Create the
.env
by using.env.example
as a reference:cp .env.example .env
- Update the
.env
file with your correct local information : username, password, database, port. - Install dependencies:
npm i
in bothfront-end
andback-end
folders. cd back-end
thennpm start
to run the Server, andcd front-end
to run the App.- To reset the database:
npm run db:reset
.
TinyURLs_App_Overview.mp4
-
Database
- PostgreSQL
-
Back-end:
- express
- TypeScript
- Node JS
- bcryptjs
- dotenv
- method-override
- morgan
- pg
- nodemon
-
Front-end
- React JS
- TypeScript
- React-Router
- React-Cookie
- React-Bootstrap
- SASS
- bcryptjs
- axios
- moment