Skip to content

WilberC/tidal-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tidal Helper

A tool to help manage Tidal music playlists and songs.

Note: This project is currently in early development.

Tech Stack

  • Backend: Python 3.11, FastAPI, SQLModel, Alembic
  • Frontend: TypeScript, Vue.js 3, Pinia, Tailwind CSS
  • Database: SQLite
  • Infrastructure: Docker, Docker Compose

Getting Started

Prerequisites

Installation & Running

  1. Clone the repository:

    git clone <repository-url>
    cd tidal-helper
  2. Environment Setup: Create a .env file from the example template:

    cp .env.example .env
  3. Start the Application: Run the following command to build and start the services:

    docker-compose up --build
  4. Access the Application:

Development

Backend (Local)

cd backend
poetry install
poetry run uvicorn app.main:app --reload

Frontend (Local)

cd frontend
npm install
npm run dev

Database Management

Database Migrations with Alembic

The project uses Alembic for database schema migrations.

Initialize Alembic (First Time Only)

If the alembic directory doesn't exist, initialize it:

cd backend
poetry run alembic init alembic

Create a New Migration

After modifying your SQLModel models, generate a new migration:

cd backend
poetry run alembic revision --autogenerate -m "Description of changes"

This will create a new migration file in backend/alembic/versions/.

Apply Migrations

To apply all pending migrations to the database:

cd backend
poetry run alembic upgrade head

Rollback Migrations

To rollback the last migration:

cd backend
poetry run alembic downgrade -1

To rollback to a specific revision:

cd backend
poetry run alembic downgrade <revision_id>

Check Current Migration Status

To see the current migration version:

cd backend
poetry run alembic current

To see migration history:

cd backend
poetry run alembic history

Initialize Database (Alternative Method)

For quick database initialization without migrations, you can use the init_db.py script:

cd backend
poetry run python init_db.py

Note: This creates all tables based on your SQLModel definitions but doesn't track migration history. For production use, prefer Alembic migrations.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published