This is a link shortening app, similar to bit.ly or ow.ly.
- URL Shortening: Xixuz allows users to shorten URLs by pasting a long URL into the Xixuz platform and a shorter URL gets automatically generated. The shortened URL is designed to be as short as possible, making it easy to share on social media or through other channels.
- Custom URLs: Xixuz also allows users to customize their shortened URLs. Users can choose their own custom domain name and customize the URL to reflect their brand or content. This feature is particularly useful for individuals or small businesses who want to create branded links for their
- QR Code Generation: Xixuz allows users to also generate QR codes for the shortened URLs. Users can download the QR code image and use it in their promotional materials or/and on their website. This feature will be implemented using a third-party QR code generator API, which can be integrated into the Xixuz platform.
- Analytics: Xixuz provides basic analytics that allow users to track their shortened URL's performance. Users can see how many clicks their shortened URL has received and where the clicks are coming from. We need to track when a URL is used.
- Link History: Xixuz allows users to see the history of links they’ve created so they can easily find and reuse links they have previously created
- Install NodeJS, mongodb
- pull this repo
- update
env
file with personal mongodb details as required, follow: How-to-deploy-mongodb-database - run
npm run start
NOTE: LINKS are referred to as limo.
field | data_type | constraints |
---|---|---|
id | string | required |
original_url | string | required |
shortened_url | Number | optional |
custom_url | Number | optional |
analytics | string | optional |
qr_code | Boolean | optional, default: false |
dateCreated | Date | optional, default: new Date() |
limo_history | string | optional, default: false |
limo_modifiedAt | string | optional, default: false |
- Route: /api/v1/shorten
- Method: POST
- Body: { "original_url": "mongodb-link" }
res.render('index', { data: { shortenedLimo: shortID, error: null } });
- Route: /api/v1/:shortID
- Method: GET
- Body:
res.redirect(limo.original_url);
- Route: /login
- Method: POST
- Body: { "email" : "example.com",
"username": "user123",
"password": "1234ghi",
- }
res.render('login', info);
NOTE: info is an object containing user details to be displayed on client side
- Route: /login
- Method: POST
- Body: { "email" : "example.com",
- "password": "1234ghi"
- }
res.render('index', {
data: {
username: user.username,
history: limos,
},
});
- Zeuhz Droid(David A.)