Add comprehensive user authentication and database integration - #3
Merged
Merged
Conversation
## Summary - Add PostgreSQL database integration with SQLAlchemy ORM - Implement JWT-based user authentication system - Add user registration and login functionality - Enhance receipt storage with user association - Add database migrations and testing utilities ## New Features - **User Authentication**: JWT-based auth with registration/login endpoints - **Database Integration**: PostgreSQL with SQLAlchemy ORM models - **User-specific Receipts**: Each user can only access their own receipts - **Enhanced Security**: Password hashing, token validation, user sessions - **Database Testing**: Test utilities for auth and database functionality ## Technical Improvements - Add comprehensive database models for users and receipts - Implement secure authentication middleware - Add database initialization scripts - Update API endpoints to require authentication - Enhanced frontend with authentication state management ## Files Added - `app/auth.py` - Authentication utilities and JWT handling - `app/auth_routes.py` - User registration and login endpoints - `app/database.py` - Database configuration and session management - `app/db_models.py` - SQLAlchemy ORM models - `init_db.py` - Database initialization script - `test_auth.py` & `test_db.py` - Authentication and database tests - `CHANGELOG.md` - Project changelog documentation ## Files Modified - Enhanced `main.py` with authentication middleware - Updated `config.py` with database and auth settings - Enhanced frontend with user authentication UI - Updated dependencies in pyproject.toml and requirements.txt 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for receptscan ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive user authentication and PostgreSQL database integration to the receipt scanner application, transforming it from a stateless service to a full-featured multi-user application.
Key Features Added
Technical Improvements
Backend Enhancements
Frontend Enhancements
New Files
app/auth.py- JWT authentication utilitiesapp/auth_routes.py- User registration/login endpointsapp/database.py- Database configuration and session managementapp/db_models.py- SQLAlchemy ORM modelsinit_db.py- Database initialization scripttest_auth.py&test_db.py- Authentication and database testsCHANGELOG.md- Project documentationMigration Guide
For existing deployments, you'll need to:
DATABASE_URLenvironment variablepython init_db.pyTest Plan
🤖 Generated with Claude Code