feat(api): add full signup/login flow with email & profile, ENV support, and port fix #18

Merged
blakeridgway merged 6 commits from refactor/username into main 2025-09-09 13:35:03 +00:00
Owner

This PR implements the following improvements and fixes in the RideAware API:

  1. Environment support & Docker adjustments
    • Allow .env to be included in Docker build by negating ignore in .dockerignore
    • Change default PORT to 5000 in Dockerfile, install python-dotenv, copy .env, update EXPOSE and HEALTHCHECK
  2. Database schema enhancements
    • Add email column (unique, non-null) to users table
    • Rename user_profile table to user_profiles
    • Set default values and types for profile columns
    • Update SQLAlchemy after_insert hook to seed empty profile for new users
  3. Auth endpoint refactor
    • Change blueprint prefix to /api
    • Enhance POST /api/signup to accept and validate email, first_name, and last_name
    • Return newly created user_id alongside username
    • Improve error handling for missing fields, invalid email, duplicates
  4. Service layer enhancements
    • UserService.create_user now accepts email, first_name, last_name
    • Validates email format, password strength (>=8 chars)
    • Checks for existing username/email with specific error messages
    • Creates User and associated UserProfile in a single transaction

These changes prepare the backend for a complete user registration/login experience, fully configurable via environment variables, and correctly exposed on port 5000.

This PR implements the following improvements and fixes in the RideAware API: 1. Environment support & Docker adjustments - Allow .env to be included in Docker build by negating ignore in .dockerignore - Change default PORT to 5000 in Dockerfile, install python-dotenv, copy .env, update EXPOSE and HEALTHCHECK 2. Database schema enhancements - Add `email` column (unique, non-null) to `users` table - Rename `user_profile` table to `user_profiles` - Set default values and types for profile columns - Update SQLAlchemy `after_insert` hook to seed empty profile for new users 3. Auth endpoint refactor - Change blueprint prefix to `/api` - Enhance `POST /api/signup` to accept and validate `email`, `first_name`, and `last_name` - Return newly created `user_id` alongside `username` - Improve error handling for missing fields, invalid email, duplicates 4. Service layer enhancements - `UserService.create_user` now accepts `email`, `first_name`, `last_name` - Validates email format, password strength (>=8 chars) - Checks for existing username/email with specific error messages - Creates `User` and associated `UserProfile` in a single transaction These changes prepare the backend for a complete user registration/login experience, fully configurable via environment variables, and correctly exposed on port 5000.
blakeridgway added 6 commits 2025-09-09 13:34:29 +00:00
blakeridgway merged commit db6f26df5d into main 2025-09-09 13:35:03 +00:00
blakeridgway deleted branch refactor/username 2025-09-09 13:35:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: rideaware/rideaware-api#18
No description provided.