How etrupja/shortly works
Shortly is an ASP.NET URL-shortening application with a separate redirect executable. Users register or sign in, manage short links, and use the redirect service to resolve links; administrators can also view users and links. Authentication includes email confirmation, phone-based two-factor verification, and external providers. The source excerpts establish the client’s dependency wiring and data-service behavior, but the Home and URL controller implementations and redirect program were not excerpted, so their runtime links remain unverified.
Main entry points: Program.cs MVC application · AuthenticationController.cs Authentication routes · UrlsService.cs URL operations · AppDbContext.cs SQL database context
Components 19
Web client
- MVC application
Shortly.Client/Program.cs - Home pages
Shortly.Client/Controllers/HomeController.cs - URL routes
Shortly.Client/Controllers/UrlController.cs
Identity and access
- Authentication routes
Shortly.Client/Controllers/AuthenticationController.cs - Role and user seeding
Shortly.Client/Data/DbInitializer.cs - Identity models
Shortly.Data/Models/AppUser.cs - User queries
Shortly.Data/Services/UsersService.cs - User service contract
Shortly.Data/Services/IUsersService.cs - Email validation
Shortly.Client/Helpers/Validators/CustomEmailValidator.cs - Role names
Shortly.Client/Helpers/Roles/Role.cs
Short-link management
- Short-link records
Shortly.Data/Models/Url.cs - URL operations
Shortly.Data/Services/UrlsService.cs - URL service contract
Shortly.Data/Services/IUrlsService.cs - Redirect executable
Shortly.Redirect/Program.cs
Data persistence
- SQL database context
Shortly.Data/AppDbContext.cs
Other components
- Visitor
- SendGrid email
- Twilio SMS
- Google / GitHub
Connections 27
- Visitor → MVC application: uses
- MVC application → Home pages: routes
- MVC application → URL routes: routes
- MVC application → Authentication routes: routes
- MVC application → SQL database context: configures
Shortly.Client/Program.cs - MVC application → URL operations: registers
Shortly.Client/Program.cs - MVC application → User queries: registers
Shortly.Client/Program.cs - MVC application → Role and user seeding: seeds
Shortly.Client/Program.cs - Authentication routes → User queries: gets users
Shortly.Client/Controllers/AuthenticationController.cs - Authentication routes → Identity models: creates users
Shortly.Client/Controllers/AuthenticationController.cs - Authentication routes → SendGrid email: sends email
Shortly.Client/Controllers/AuthenticationController.cs - Authentication routes → Twilio SMS: sends codes
Shortly.Client/Controllers/AuthenticationController.cs - Authentication routes → Google / GitHub: supports login
- User queries → SQL database context: queries
Shortly.Data/Services/UsersService.cs - User queries → Identity models: loads
Shortly.Data/Services/UsersService.cs - URL routes → URL operations: uses
- Home pages → SQL database context: uses
Shortly.Client/Controllers/HomeController.cs - URL operations → SQL database context: reads and writes
Shortly.Data/Services/UrlsService.cs - URL operations → Short-link records: handles
Shortly.Data/Services/UrlsService.cs - URL operations → URL service contract: implements
Shortly.Data/Services/UrlsService.cs - User queries → User service contract: implements
Shortly.Data/Services/UsersService.cs - SQL database context → Identity models: stores
Shortly.Data/AppDbContext.cs - SQL database context → Short-link records: stores
Shortly.Data/AppDbContext.cs - Redirect executable → URL operations: uses
Shortly.Redirect/Program.cs - Role and user seeding → Identity models: creates accounts
Shortly.Client/Data/DbInitializer.cs - Role and user seeding → Role names: assigns roles
Shortly.Client/Data/DbInitializer.cs - Short-link records → Identity models: belongs to user
Shortly.Data/Models/Url.cs