betterauth-fastapi-jwt-bridge
π―Skillfrom bilalmk/todo_correct
Bridges authentication between FastAPI and JWT tokens, providing secure token generation, validation, and user authentication mechanisms for the todo application.
Installation
npx skills add https://github.com/bilalmk/todo_correct --skill betterauth-fastapi-jwt-bridgeSkill Details
Overview
# Todo Evolution - Hackathon II
Multi-user todo application with authentication, built for Panaversity Evolution of Todo Hackathon.
Project Overview
Phase II: Full-stack web application with user authentication
- Frontend: Next.js 16 with App Router, TypeScript, Tailwind CSS
- Backend: FastAPI with async operations
- Database: Neon Serverless PostgreSQL
- ORM: SQLModel with Alembic migrations
- Authentication: Better Auth with JWT tokens (7-day expiration)
- Password Hashing: Argon2id via pwdlib
Project Structure
```
todo_correct/
βββ backend/ # FastAPI backend
β βββ src/
β β βββ api/ # API endpoints
β β βββ core/ # Config, database, security
β β βββ models/ # SQLModel entities
β β βββ services/ # Business logic
β βββ tests/ # Unit and integration tests
β βββ alembic/ # Database migrations
β βββ main.py # Application entry point
β βββ pyproject.toml # Python dependencies
βββ frontend/ # Next.js 16 frontend
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # React components
β β βββ lib/ # Utilities (auth, validation)
β β βββ types/ # TypeScript types
β βββ package.json # Node dependencies
β βββ tsconfig.json # TypeScript config
βββ specs/ # Spec-driven development artifacts
βββ 001-setup-auth-foundation/
βββ spec.md # Feature specification
βββ plan.md # Architecture plan
βββ tasks.md # Implementation tasks
βββ data-model.md # Database schema
βββ contracts/ # API contracts
```
Prerequisites
- Python: 3.11+
- Node.js: 18+
- PostgreSQL: Neon Serverless account (or local PostgreSQL)
- Git: For version control
Windows Users
- WSL 2 (Windows Subsystem for Linux) is required
- Follow setup instructions: https://learn.microsoft.com/en-us/windows/wsl/install
Quick Start
1. Clone Repository
```bash
git clone
cd todo_correct
```
2. Database Setup (Neon)
- Create account at https://neon.tech
- Create a new project
- Copy the connection string
3. Backend Setup
```bash
cd backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
pip install -e ".[dev]" # Development dependencies
# Create .env file
cp .env.example .env
# Edit .env with your settings:
# DATABASE_URL=postgresql+asyncpg://user:password@host/database
# BETTER_AUTH_SECRET=
# CORS_ORIGINS=http://localhost:3000
# Run database migrations
alembic upgrade head
# Start development server
python main.py
```
Backend will run on http://localhost:8000
API Documentation: http://localhost:8000/docs
4. Frontend Setup
```bash
cd frontend
# Install dependencies
npm install
# Create .env.local file
cp .env.example .env.local
# Edit .env.local with your settings:
# DATABASE_URL=postgresql://user:password@host/database
# BETTER_AUTH_SECRET=
# NEXT_PUBLIC_APP_URL=http://localhost:3000
# NEXT_PUBLIC_BACKEND_API_URL=http://localhost:8000
# Start development server
npm run dev
```
Frontend will run on http://localhost:3000
Features Implemented (Phase II)
User Story 1: User Registration β
- Create new account with email, password, and name
- Email format validation
- Password minimum 8 characters
- Duplicate email prevention
- Argon2id password hashing
- JWT token generation
- Automatic login after registration
User Story 2: User Login β
- Authenticate with email and password
- JWT token with 7-day expiration
- Consistent error messages (prevents user enumeration)
- Redirec
More from this repository9
sqlmodel-expert skill from bilalmk/todo_correct
Based on the README, I cannot confidently infer what the specific "nextjs-devtools" Claude Code skill does. The README provides an overview of a full-stack todo application with Next.js, but does n...
configuring-better-auth skill from bilalmk/todo_correct
Automates web browser interactions and testing for the Todo application using Playwright, enabling programmatic navigation, form filling, and interaction verification.
building-chat-interfaces skill from bilalmk/todo_correct
Guides developers through creating full-stack Next.js applications with authentication, TypeScript, and modern web development best practices, focusing on structured project setup and implementatio...
Based on the project context and README, I cannot confidently infer what the specific "context7-efficient" Claude Code skill does. The README provides an overview of a todo application with authent...
Based on the repository README, I cannot find a specific reference to a "building-mcp-servers" Claude Code skill. The README describes a multi-user todo application with authentication, but does no...
I apologize, but after carefully reviewing the README, I cannot confidently infer what the "building-chat-widgets" Claude Code skill specifically does. The README describes a todo application with ...