<project · advanced>
URL shortener with accounts
Sign-up, hashed passwords, click counts and rate limiting, deployed to the cloud.
Build url shortener with accounts one manageable milestone at a time. Keep your decisions, tests and finished work together so your portfolio shows what you learned, not only the final result.
- Authentication
- Security
- Rate limiting
- Deployment
Build it step by step
Model accounts and links
Use Node.js and PostgreSQL with local Docker for practice. Define users, links and click events, and make short codes unique at the database level.
Protect accounts
Hash passwords with Argon2 or bcrypt and never store plaintext. Use secure session cookies, validate input and restrict link management to the owner.
Create safe redirects
Accept only http and https destinations and generate random short codes. Return 404 for unknown codes, record aggregate click counts and reject unsafe schemes.
Limit abuse
Rate-limit signup, login and link creation. Test ownership checks and avoid collecting unnecessary visitor identifiers or logging passwords.
Deploy carefully
Choose a host with a current free tier only after checking limits; otherwise demonstrate locally. Set secrets outside Git, enable HTTPS and document backup and restore steps.
Share your finished work
Commit your source and a README explaining setup, decisions, tests and limitations. Remove secrets and personal data, credit dependencies and assets, then add the public repository or portfolio link and an optional working demo to LEARN Showcase. Hosting is optional; a clear repository or design case study is enough.
// done when
- Passwords are hashed
- Another account cannot edit a link
- Unsafe URL schemes are rejected
- Unknown codes and rate limits are tested
- README includes setup, credits and limitations; shared links are safe and accessible
// stretch goals
- Add link expiry
- Add an abuse-report workflow
Finished? Show it off
Add your project to the LEARN showcase so other learners and employers can see it.
Sign in to add your finished project to the showcase.