In this project you will create your own URL shortener!
This repository includes a basic template for starting the project:
- Fork this repository to your account as a public repo
- Clone your new repository to your computer ๐ฅ
- Install the project dependencies by running
npm install
from the vscode terminalctrl + j
(make sure you are in the correct directory) ๐ - Create a new branch for the development process
- Make changes to the code to meet the project requirements ๐
- Commit Early, Push Often - your work will be evaluated by your git flow and overall github usage ๐โโ๏ธ
- Before submitting, create a pull request from the development branch into the main branch. Leave the PR open and do not merge the branches. The open PR will be used to review and mark your code
- Good Luck! ๐ค
-
Create a route
/api/shortUrl/
in yourexpress
app that will handle all url shortening requests. (We recommend using express Router) -
Write/read Asynchronously a single JSON file as your DB
-
Serve your client files from your server at route
/
-
Style and change your front-end as you wish. You can take inspiration from this example
-
Examine thoroughly and copy all functionality of this FCC example
-
Use a
class DataBase{}
to read/write (Asynchronously) all data in your back-end (you can use a json file as persistent layer) -
Add another functionality to your service: a statistics route (
api/statistic/:shortUrl-id
) that will respond with the following data pershortUrl-id
:creationDate
- a SQLDate formatredirectCount
- the amount of times this url was used for redirectionoriginalUrl
shortUrl-id
- Add any feature you desire. Some ideas worth extra points:
- Custom short URL. Support optional
shortUrl-id
parameter in yourPOST
request. Pay attention to error handling. - Serve a styled statistics dashboard instead of the default JSON statistics
- Use the
jsonBin.io
service bin as your persistent layer in your back-end DB class (use CRUD operations to read write bins) - Try implementing user management
- Custom short URL. Support optional
Add an explanation in README.md
for each bonus feature you add and a link to any resource you used
- Using jsonbin.io with/instead of writing to files
- Correct DB class usage
- Code quality and style: indentation, Meaningful and non-disambiguate variable names, Comments and documentation, file and directory structure
- Visual creativity, style your front-end to make it look awesome ๐ ๐ฟ
- Division to reusable functions, no code duplication
- Git usage: meaningful commit messages, small commits, folder and file structures, README file, issues, etc...
- Submit your solution repo link - an open PR from your dev branch to the main one
- Your readme should have a
repl.it
link with your solutions. - Submit a link to your repo to the CRM.
GOOD LUCK!