Skip to main content
Technology & EngineeringSoftware29 lines

Prototype a Web App with Authentication and Postgres

Build and verify one authenticated web app workflow with PostgreSQL persistence, an owned local test database and an explicitly gated deployment path.

Quick Summary9 lines
Pick one user-facing operation, such as sign in, add a saved note and see it after a reload. Match the user's existing framework and login provider where possible. Use a supported session library or auth provider instead of creating your own authentication protocol. Decide which user identity is stable and how it maps to the database record. Scope the prototype to this one normal entry point before adding more features.

## Key Points

- [OWASP session management](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html)
- [PostgreSQL row security](https://www.postgresql.org/docs/current/ddl-rowsecurity.html)
- [FastAPI response model example for protected data boundaries](https://fastapi.tiangolo.com/tutorial/response-model/)
skilldb get software-skills/authenticated-web-app-prototypeFull skill: 29 lines
Paste into your CLAUDE.md or agent config

Prototype a Web App with Authentication and Postgres

Pick one user-facing operation, such as sign in, add a saved note and see it after a reload. Match the user's existing framework and login provider where possible. Use a supported session library or auth provider instead of creating your own authentication protocol. Decide which user identity is stable and how it maps to the database record. Scope the prototype to this one normal entry point before adding more features.

Build a small local slice with real persistence

Use a dedicated local or explicitly approved test PostgreSQL database. Create migrations, seed synthetic users and record the app's startup sequence and configuration without including secrets. Use separate migration and application database roles when practical, and keep connection details and auth credentials on the server. The browser needs only configuration explicitly intended to be public.

On each protected request, resolve the current authenticated user on the server. Assign the record owner from that identity, not a client-supplied owner ID. Scope reads and writes to it and use parameterized database operations. Where PostgreSQL RLS is part of the model, verify with the application's actual least-privileged role; table owners and roles that bypass RLS behave differently. Cookie-based sessions need an appropriate secure cookie and CSRF strategy. A rendered login button or hidden page link does not enforce access.

Verify from an empty database to two-user isolation

Start from clean migrations, then sign in as test user A, create a record and check it after a reload and app restart. Sign in separately as user B and verify that the other user's record cannot be read or updated through the normal endpoint. Verify signed-out access and a stale session, denied input, and an unavailable database. Check that a failed write does not show durable success. Use server-side and visible evidence tied to the same request and user.

Provide a repeatable local run command, migration order and what was tested. If deployment is requested and authorized, record the target, owned credentials, migration and rollback strategy, environment isolation, HTTPS and auth callback configuration. Verify the exact deployed revision with synthetic data and the same access checks. When authorization ends at a prototype, deliver a runnable local artifact without creating a hosted environment.

References and rights

Original SkillDB instructions under LicenseRef-SkillDB-Content. References were checked 2026-11-13 and used for technical verification.

Install this skill directly: skilldb add software-skills

Get CLI access →

Related Skills

Code Review

Perform deep, actionable code reviews covering bugs, security vulnerabilities, performance issues, and maintainability concerns. Use this skill when the user asks to review code, check a pull request, audit code quality, get feedback on an implementation, or wants a second pair of eyes on their work. Also trigger for "review this," "what's wrong with this code," "can you check my PR," "code quality check," or any request for constructive criticism of source code. Works with any language or framework.

Software•238L

Database Performance

Optimize database performance through indexing strategies, query optimization, schema design, and capacity planning. Use this skill when the user asks about slow queries, database indexing, query optimization, schema design for performance, database scaling, or wants guidance on diagnosing and fixing database bottlenecks.

Software•135L

Database

Design database schemas, optimize queries, plan migrations, and develop indexing strategies for relational and NoSQL databases. Use this skill when the user asks about database design, schema modeling, query performance, SQL optimization, migrations, indexing, or data modeling. Also trigger for "slow query," "design a schema," "normalize this," "add an index," "migration strategy," "N+1 problem," or any task involving database architecture, query tuning, or data storage decisions. Covers PostgreSQL, MySQL, SQLite, MongoDB, Redis, and general database principles.

Software•338L

Debug

Methodical debugging — reproduce, isolate, root-cause, and fix bugs using systematic techniques rather than guesswork. Use this skill when the user reports a bug, encounters an error, gets unexpected behavior, sees a stack trace, or needs help troubleshooting. Also trigger for "why is this broken," "this doesn't work," "I'm getting an error," "help me fix this," "unexpected output," or any situation where code isn't behaving as intended. Works with any language, framework, or runtime environment.

Software•224L

Devops

Design and implement CI/CD pipelines, Docker configurations, infrastructure-as-code, and deployment strategies. Use this skill when the user asks about CI/CD, Docker, containers, Kubernetes, deployment, infrastructure, DevOps practices, or build pipelines. Also trigger for "set up a pipeline," "Dockerize this," "deploy this app," "GitHub Actions workflow," "automate deployment," "infrastructure as code," or any task involving build automation, containerization, orchestration, or production infrastructure. Covers GitHub Actions, GitLab CI, Docker, Kubernetes, Terraform, and general DevOps principles.

Software•392L

Documentation

Write clear, comprehensive technical documentation — API references, READMEs, architecture decision records, onboarding guides, and inline code documentation. Use this skill when the user asks to write documentation, create a README, document an API, write an ADR, explain a system, or create developer guides. Also trigger for "document this," "write a README," "API docs," "how do I explain this codebase," "onboarding guide," or any task involving technical writing for a developer audience. Adapts to any language, framework, or documentation tooling.

Software•406L