Skip to content

ChuyuChoyeon/Rosetta

Repository files navigation

Rosetta Blog

A modern blog platform built with FastAPI and Nuxt.

Tech Stack

Backend

  • FastAPI - Modern async Python web framework
  • SQLAlchemy 2.0 - Async ORM with type hints
  • Pydantic v2 - Data validation
  • JWT - Authentication
  • PostgreSQL/SQLite - Database

Frontend

  • Nuxt 3 - Vue.js framework
  • Tailwind CSS v4 - Utility-first CSS
  • DaisyUI - Component library
  • Pinia - State management

Project Structure

rosetta/
├── backend/           # FastAPI backend
│   ├── api/           # API routes
│   ├── core/          # Core config and database
│   ├── models/        # SQLAlchemy models
│   ├── schemas/       # Pydantic schemas
│   └── main.py        # Application entry point
├── frontend/          # Nuxt frontend
│   ├── assets/        # Static assets
│   ├── components/    # Vue components
│   ├── composables/   # Composables
│   ├── layouts/       # Layout components
│   ├── pages/         # Page components
│   ├── stores/        # Pinia stores
│   └── types/         # TypeScript types
└── media/             # User uploaded files

Development

Backend

# Install dependencies
uv sync

# Run development server
uv run uvicorn backend.main:app --reload --port 8000

Frontend

cd frontend

# Install dependencies
npm install

# Run development server
npm run dev

Environment Variables

Create a .env file in the project root:

# Database
DATABASE_URL=sqlite+aiosqlite:///./rosetta.db
# Or PostgreSQL: postgresql+asyncpg://user:password@localhost/rosetta

# Redis (optional)
REDIS_URL=redis://localhost:6379/0

# Security
SECRET_KEY=your-secret-key-change-in-production

# CORS
CORS_ORIGINS=["http://localhost:3000"]

# API
NUXT_PUBLIC_API_BASE=http://localhost:8000/api

License

MIT

About

使用本项目的个人博客

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors