How jaoko-ai/urlshortener works
This repository is a URL-shortening application with a Vue web interface and an ASP.NET Core API. The main visible workflow is entering a URL in the home view, posting it to the API, and displaying the returned short URL; the API’s URL-creation implementation was not sampled, so that endpoint connection is supported by the frontend request but its internal processing is not inferred. The sampled query endpoint looks up a short code, increments clicks, records request metadata, and persists analytics. Delete, stats, and authentication controllers are present in the tree, but their behavior and wiring are not established by the samples.
Main entry points: Program.cs ASP.NET API · query.cs Short-code query · database.cs EF context · index.ts View router
Components 18
Web interface
- Vue app
url-shortener-web/src/main.ts - App shell
url-shortener-web/src/App.vue - View router
url-shortener-web/src/router/index.ts - Shorten URL
url-shortener-web/src/views/HomeView.vue - Auth view
url-shortener-web/src/views/AuthView.vue
API endpoints
- ASP.NET API
url-shortener-api/Program.cs - URL management
url-shortener-api/Controllers/Urls.cs - Short-code query
url-shortener-api/Controllers/query.cs - URL deletion
url-shortener-api/Controllers/Delete.cs - Click statistics
url-shortener-api/Controllers/Stats.cs - Registration
url-shortener-api/Controllers/auth.cs
Persistence and domain
- Base62 codec
url-shortener-api/Utilities.cs - EF context
url-shortener-api/database.cs - URL and click records
url-shortener-api/database.cs - User entity
url-shortener-api/Entities/user.cs
Other components
- Visitor
- PostgreSQL
- Browser request
Connections 21
- Visitor → Vue app: uses
- Vue app → App shell: mounts
- App shell → View router: renders routes
- View router → Shorten URL: loads view
- View router → Auth view: loads view
- Visitor → Shorten URL: enters URL
- Shorten URL → Browser request: posts shorten request
- Browser request → ASP.NET API: HTTP request
- ASP.NET API → URL management: maps controllers
- ASP.NET API → Short-code query: maps controllers
- ASP.NET API → URL deletion: maps controllers
- ASP.NET API → Click statistics: maps controllers
- ASP.NET API → Registration: maps controllers
- ASP.NET API → EF context: configures EF
- Short-code query → EF context: queries and saves
- EF context → URL and click records: tracks entities
- EF context → PostgreSQL: uses Npgsql
- Short-code query → URL and click records: reads and updates
- Short-code query → URL and click records: adds click record
- Registration → User entity: uses user model
- URL management → Base62 codec