https://github.com/karped1em/steam-code-gate
Displays Steam login codes received via email in real time on a web page
https://github.com/karped1em/steam-code-gate
email flask python steam website
Last synced: 2 months ago
JSON representation
Displays Steam login codes received via email in real time on a web page
- Host: GitHub
- URL: https://github.com/karped1em/steam-code-gate
- Owner: KARPED1EM
- License: mit
- Created: 2024-05-24T16:11:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-29T08:07:27.000Z (9 months ago)
- Last Synced: 2025-09-29T10:08:57.022Z (9 months ago)
- Topics: email, flask, python, steam, website
- Language: Python
- Homepage: https://stm.leever.cn
- Size: 31.3 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🚪 Steam Code Gate
**Steam Verification Code Hosting Service**
Display Steam email verification codes and OTP (Steam TOTP) in a centralized web interface.
English | [简体中文](./README.zh-CN.md)




---
## ✨ Features
- 👥 **Multi-user System**
Guest / Admin / Super Admin roles supported
- 🔐 **Multi-account Hosting**
Manage multiple Steam accounts simultaneously
- 🔄 **Dual Verification Modes**
Email verification codes and Steam TOTP (OTP)
- 🛡️ **Permission Control**
Guests access via passcode, admins manage their own accounts, super admins manage all
- ⚡ **Automatic Updates**
OTP auto-refresh, email codes fetched on demand with debounce protection
---
## 🔑 Default Credentials (Important)
On first startup, the system provides a built-in administrator account:
```
Username: admin
Password: admin123
````
⚠️ **For security reasons, please change the password immediately after login.**
---
## 🧱 Tech Stack
- **Backend**: FastAPI · SQLAlchemy · SQLite
- **Frontend**: Jinja2 · Vanilla JavaScript
- **Authentication**: JWT · bcrypt
- **Architecture**: Repository · DTO · SOLID
---
## 🚀 Docker Deployment (Recommended)
No local Python environment required.
Create `compose.yml`:
```yaml
services:
steam-code-gate:
image: karped1em/steam-code-gate:latest
container_name: steam-code-gate
restart: unless-stopped
ports:
- "13780:8000"
environment:
DATABASE_PATH: "/data/scg.db"
JWT_SECRET_KEY: "please-change-me"
volumes:
- scg-data:/data
volumes:
scg-data:
name: steam-code-gate-data
````
Start:
```bash
docker compose up -d
```
Open in browser:
```
http://:13780
```
> ⚠️ Make sure to change `JWT_SECRET_KEY` to a strong random value.
---
## 🧪 Local Development
You may configure environment variables using a `.env` file.
Example `.env`:
```env
DATABASE_PATH=./scg.db
JWT_SECRET_KEY=dev-secret
```
Start the application:
```bash
uv run python run.py
```
Open:
```
http://localhost:8000
```
---
## ⚙️ Configuration
### Environment Variables (Required)
> ❗ Both environment variables are **mandatory** and must not be empty.
> The application will refuse to start if any of them is missing or empty.
| Name | Description |
| ---------------- | ------------------------- |
| `DATABASE_PATH` | SQLite database file path |
| `JWT_SECRET_KEY` | JWT secret key |
### Database
SQLite database file will be created automatically on first startup.
---
## 📦 Upgrade
Pull the latest image and restart:
```bash
docker compose pull
docker compose up -d
```
Data stored in volumes will not be affected.