A professional, production-ready boilerplate for a web application featuring Google SSO and Email/Password Authentication. Built with React (Vite) and Python (FastAPI), designed with a "Soft Minimalism" aesthetic.
Tags:
google-sso,authentication,fastapi,react,jwt,boilerplate,python,sqlite,soft-minimalism,glassmorphism,email-verification
- Authentication: JWT-based secure Access Tokens.
- Google SSO: Native integration with Google Identity Services.
- User Dashboard: Protected routes with a sidebar layout.
- Profile Management: Update name, phone, and address.
- Modern UI: Glassmorphism, soft animations, and responsive design.
- Python 3.9+
- Node.js 16+
- SQLite (Built-in)
google-auth-website/
├── backend/ # FastAPI Python Backend
└── frontend/ # React Vite Frontend
Navigate to the backend directory:
cd backendCreate a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
pip install "bcrypt<4.0.0" fastapi uvicorn sqlalchemy pydantic python-multipart python-jose requests google-auth google-auth-oauthlib email-validator python-dotenvConfiguration (.env):
Create a .env file in the backend/ directory:
GOOGLE_CLIENT_ID=your_google_client_id_here
SECRET_KEY=your_secure_random_string_hereRun the server:
uvicorn main:app --reloadBackend will run at: http://localhost:8000.
Navigate to the frontend directory:
cd frontendInstall dependencies:
npm installConfiguration (.env):
Create a .env file in the frontend/ directory:
VITE_GOOGLE_CLIENT_ID=your_google_client_id_hereRun the development server:
npm run devFrontend will run at: http://localhost:5173.
- Go to Google Cloud Console.
- Create a new Project.
- Navigate to APIs & Services > OAuth consent screen. Configure as "External".
- Navigate to Credentials > Create Credentials > OAuth Client ID.
- Application Type: Web application.
- Authorized JavaScript origins:
http://localhost:5173.
- Copy the Client ID and paste it into both
.envfiles.
- 500 Error on Register: Ensure
bcryptversion is compatible (<4.0.0). - Google Login Error: Verify
Authorized JavaScript originsmatches your frontend URL exactly. - Import Error: Check relative paths in your React components.
MIT

