feat: Complete backend API setup with registration endpoint

- Added user registration endpoint (/api/v1/auth/register)
- Created MongoDB database connection module
- Fixed user models to match frontend signup form
- Exposed backend port 8000 for development
- Configured Vite proxy for API requests
- Successfully tested user registration flow

Backend is now fully functional with:
- MongoDB connection
- User registration with password hashing
- JWT token generation
- Proper error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2025-08-31 11:46:04 +09:00
parent 0aa6db1b3b
commit 8996bd8638
6 changed files with 89 additions and 6 deletions

View File

@ -10,17 +10,21 @@ class UserRole(str, Enum):
class UserBase(BaseModel):
email: EmailStr
username: str
full_name: str
username: Optional[str] = None
full_name: Optional[str] = None
role: UserRole = UserRole.USER
is_active: bool = True
phone_number: Optional[str] = None
birth_date: Optional[str] = None
gender: Optional[str] = None
profile_picture: Optional[str] = None
organization: Optional[str] = None
class UserCreate(UserBase):
class UserCreate(BaseModel):
email: EmailStr
password: str
name: str
organization: Optional[str] = None
class UserUpdate(BaseModel):
full_name: Optional[str] = None