Skip to content

george-radu-cs/TicketStoreWebApi

Repository files navigation

Ticket Store Web API .NET 5

Install dependencies

dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 5.0
dotnet tool install --global dotnet-ef --version 5.0
dotnet add package Microsoft.EntityFrameworkCore.Design --version 5.0
dotnet add package Microsoft.EntityFrameworkCore.Relational --version 5.0
dotnet add package Microsoft.EntityFrameworkCore.Tools --version 5.0
dotnet add package Microsoft.EntityFrameworkCore --version 5.0
dotnet add package Microsoft.EntityFrameworkCore.Proxies --version 5.0
dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 5.0
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore --version 5.0
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer --version 5.0

Add Migrations

dotnet ef migrations add <migration-name>
dotnet ef migrations remove
dotnet ef database update

Insert Roles in DB

Some basic roles for app

INSERT INTO dbo.AspNetRoles ([Id], [Name], [NormalizedName], [ConcurrencyStamp])
VALUES (1, 'Admin', 'ADMIN', NULL)
    INSERT
INTO dbo.AspNetRoles ([Id], [Name], [NormalizedName], [ConcurrencyStamp])
VALUES (2, 'Buyer', 'BUYER', NULL)

INSERT INTO dbo.AspNetRoles ([Id], [Name], [NormalizedName], [ConcurrencyStamp])
VALUES (3, 'Organizer', 'ORGANIZER', NULL)

TODO

Basic features:

  • authentication
  • create all tables in db
  • add authentication controller
  • add event controller
  • add reviews controller
  • add ticket controller
  • relation one-to-one
  • relation one-to-many
  • relation many-to-many
  • add authorization for endpoints
  • input validations for all methods
  • add response models to now return all types of data to web
  • change returning https codes and error messages for all endpoints
  • enhance password encryption by adding some random key from .env
  • add method to get the current user
  • move the conversions from inputModels to EntityModel in utils
  • after UI modify endpoints to filter data

To be added after ALL basic features are done and have more time left

  • verify email at signup
  • add reset password with mail verification - SendGrid
  • add phone verification using twilio for one task above
  • send receipt to user's mail when buying tickets from site - SendGrid
  • add cron to update event status if it's to late to buy tickets (check daily)

About

Ticket Store Web API using .NET 5.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages