C#advancedwebAI generated

E-commerce Inventory API with JWT Auth

A secured ASP.NET Core Web API managing product inventory and stock levels, with JWT-based authentication, role-based authorization for admin vs viewer roles, and EF Core persistence. Learners practice ASP.NET Core identity/JWT setup, authorization policies, and layered API architecture.

Estimate
~12.5h
Steps
6
Completed by
0
Proposed by
codeseed.app

ASP.NET Core · Entity Framework Core · JWT Bearer

Project roadmap

  1. 01

    Scaffold the API and inventory models

    ~2h

    Create the project with Product, Category, and StockMovement entities and EF Core migrations.

  2. 02

    Implement JWT authentication

    ~2.5h

    Add user registration/login endpoints issuing JWT tokens with configured expiry and signing key.

  3. 03

    Add role-based authorization policies

    ~2h

    Define admin and viewer roles and restrict write endpoints to admins using [Authorize] policies.

  4. 04

    Implement inventory CRUD and stock adjustments

    ~2.5h

    Build endpoints for managing products and recording stock in/out movements with quantity validation.

  5. 05

    Add low-stock alerting endpoint

    ~1.5h

    Add an endpoint that lists products below a configurable reorder threshold.

  6. 06

    Write authorization-focused integration tests

    ~2h

    Write tests verifying viewers are blocked from write endpoints while admins succeed.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~12.5h · 6 steps

Tech stack

ASP.NET CoreEntity Framework CoreJWT Bearer