8000 GitHub - matt-wil/AnkerBackend
[go: up one dir, main page]

Skip to content

matt-wil/AnkerBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧿 Anker Tattoo Studio β€” Backend API (Flask)

This is the backend API for the Anker Tattoo & Piercing Studio platform. Built with Flask, it powers all authentication, database management, and artist CRUD operations.


πŸš€ Features

  • JWT Authentication (access + refresh tokens)
  • Artist management (bio, profile image, social links, etc.)
  • Admin-safe CRUD endpoints
  • SQLite3 + SQLAlchemy
  • Marshmallow schema validation
  • Alembic (Flask-Migrate) for DB migrations

πŸ› οΈ Tech Stack

  • Python 3.12+
  • Flask
  • Flask-JWT-Extended
  • Flask-Migrate / Alembic
  • SQLAlchemy ORM
  • Marshmallow
  • CORS enabled for React frontend

πŸ“ Structure

backend/
β”œβ”€β”€ app.py
β”œβ”€β”€ config.py
β”œβ”€β”€ extensions.py
β”œβ”€β”€ models.py
β”œβ”€β”€ routes.py
β”œβ”€β”€ auth/
β”‚   β”œβ”€β”€ views.py
β”‚   β”œβ”€β”€ helpers.py
β”œβ”€β”€ instance/
β”‚   └── anker_freiburg.db
β”œβ”€β”€ migrations/
β”œβ”€β”€ .env
β”œβ”€β”€ .flaskenv

πŸ§ͺ Setup & Run

cd src
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# First time
flask db init
flask db migrate -m "initial"
flask db upgrade

# Run
flask run

πŸ” Example Endpoints

POST   /auth/register
POST   /auth/login
GET    /artists
POST   /artists
PUT    /artists/:id
DELETE /artists/:id

All secured routes require Bearer token in Authorization header.


πŸ” .env

SQLALCHEMY_DATABASE_URI=sqlite:///instance/anker_freiburg.db
JWT_SECRET_KEY=your_secret_here
FLASK_RUN_HOST=0.0.0.0
FLASK_RUN_PORT=5001

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0