Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Task management system

NotificationsYou must be signed in to change notification settings

m-danya/planty

Repository files navigation

"I haveplenty things to do!"

Planty is an open-source task management app inspired by Todoist and GTD system.

This project is beingactively developed and is not yet a fully working product.

Here is a quick demo (last updated: December 12, 2024):

planty_demo_1.mp4

How to run

Prerequisites: Docker (with compose plugin)

git clone https://github.com/m-danya/plantycd plantycp .env.sample .envecho -e "\nPLANTY_AUTH_SECRET=$(openssl rand -base64 32)" >> .env# change other secrets in .env# TODO: Use Alembic to create the database, empty file won't work# create here planty.db (see below one-liner with pytest for now)docker compose up -ddocker exec -it planty-backend-1 uv run python -m planty.scripts.create_admin

Openhttp://localhost to access the app.

Development notes

How to run backend and frontend locally

Prerequisites:

  • Docker (with compose plugin)
  • uv
  • nvm
git clone https://github.com/m-danya/plantycd plantycp .env.dev.sample .env.devecho "\nPLANTY_AUTH_SECRET=$(openssl rand -base64 32)" >> .env.devuv syncsource .venv/bin/activate# Run Alembic migrations# alembic upgrade head# Alembic migrations are not being maintained yet due to a high pace of changes# during initial development. To get db with sample data from tests, uncomment a# line in `config.py` to avoid using in-memory db for tests and run this:pytest; mv planty_test.db planty.db# or just run this for automatic commenting, running tests and uncommenting:sed -i '/Uncomment to /{n;s/# //}' planty/config.py; pytest planty/application; mv planty_test.db planty.db; sed -i '/Uncomment to /{n;s/^\(\s*\)/\1# /}' planty/config.py; echo Done. DB is ready!# run "FastAPI" configuration in VS code or:uvicorn planty.main:app --reload

To start the frontend, run the following commands:

cd frontendnpm inpm run dev

Usenvm to manage nodejs versions:

nvm install --lts 20nvm use 20

Switching between database engines

By default, the SQLite engine is used for persistence, but you can easily switchto PostgreSQL: changeDB_TYPE in.env file topostgresql and runthe system withdocker compose compose.yaml --profile with-postgres up -d.

Run tests and type checking

pytestmypy .

Measuring code coverage:

coverage run -m pytestcoverage report # or "coverage html"

Run linting & formatting

(or just use Ruff extension for VS Code)

ruff check --extend-select I --fixruff format

Generate types for frontend from openapi.json

  1. Start backend, save 127.0.0.1:8000/openapi.json tofrontend directory (TODO: automate)
  2. Run this:
cd frontendnpx swagger-typescript-api -p ./openapi.json -o ./api --axios

[8]ページ先頭

©2009-2025 Movatter.jp