Status History
Jun 1, 10:00 PM Pending
Jun 1, 10:00 PM In Progress
Intake Form
Technical Specification
Frontend
Express.js + EJS (Server-side Rendering)
Backend
Express.js REST API
Database
PostgreSQL via Neon
Hosting
Render (Node.js)
Summary

A high-performance URL shortening service that maps long destination URLs to compact, shareable slugs. It leverages PostgreSQL for persistent storage and atomic click tracking, providing users with a simple dashboard to monitor link engagement.

File Structure
server.js Application entry point and middleware configuration
db/index.js PostgreSQL connection pool using pg-promise or node-postgres
routes/urlRoutes.js Routes for shortening URLs and handling redirects
controllers/urlController.js Logic for generating short codes, saving to DB, and fetching analytics
views/index.ejs Main dashboard for submitting URLs and viewing the list of shortened links
public/style.css Basic styling for the frontend
.env Environment variables for database connection string and base URL
Features (4)
URL Shortening P1
Converts a valid long URL into a unique 6-8 character short code.
  • User can input a long URL
  • System validates the URL format
  • System generates a unique short code and stores it in PostgreSQL
  • System returns the full shortened URL to the user
Redirection P1
Redirects users from the short URL to the original destination.
  • Accessing /[shortCode] lookups the original URL in the database
  • System performs a 302 redirect to the original URL
  • System returns a 404 if the short code does not exist
Click Tracking P2
Increments a counter every time a short link is accessed.
  • Database schema includes a click_count column
  • Each redirect event triggers an atomic increment of the click count
  • Clicks are tracked accurately even with concurrent requests
Analytics Dashboard P3
A simple UI to view all generated links and their performance.
  • Table view showing Original URL, Short URL, and Total Clicks
  • Data is fetched directly from the PostgreSQL database
Build Log
scoping Starting AI-powered tech spec generation
scoping Tech spec generated successfully
start Build orchestration started for project 17
attempt Build attempt 1/3
generate Generated 8 files success
build Build succeeded success
complete Build completed successfully success
status Project status updated to Review
Deliverables
💻
Source Code
Not yet pushed
🌐
Live Preview
Preview not yet deployed
📜
Documentation
Docs generated with code push

Delivery in progress — workspace is being packaged and pushed.