Dart Backend REST API with JWT Auth
A backend REST API built in Dart using the shelf framework, backed by PostgreSQL, with JWT-based authentication and role-based route protection. Learners practice server-side Dart, middleware composition, database access, and auth token handling.
- Estimate
- ~12h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
shelf · postgres package · dart_jsonwebtoken
Project roadmap
- 01
Set up the shelf server
~1.5hCreate a shelf server with a router and a composable middleware pipeline.
- 02
Connect to PostgreSQL
~2hConnect to a PostgreSQL database and write migrations for users and core resource tables.
- 03
Implement auth endpoints
~2hBuild registration and login endpoints that issue signed JWTs.
- 04
Add auth middleware
~2hWrite middleware that validates JWTs on incoming requests and enforces role-based access.
- 05
Build protected CRUD endpoints
~2.5hImplement create, read, update, and delete endpoints for the core resource behind the auth middleware.
- 06
Add logging and rate limiting
~2hAdd request logging, centralized error handling, and basic rate limiting middleware.
Resources
- DocsDart Guides
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack