Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,51 @@ Cloud sync, authentication, custom themes, export, mobile version — planned fo
## Running locally

### Backend

```bash
cd backend
pip install -r requirements.txt
python run.py
python run.py
```
Server runs on `http://localhost:5000`

### Test data (optional)
```bash
python seed.py
```

Database is stored in the system app data folder, not in the project folder:

| OS | Path |
|---|---|
| Windows | `%LOCALAPPDATA%\folio.ink\` |
| macOS | `~/Library/Application Support/folio.ink/` |
| Linux | `~/.local/share/folio.ink/` |

### Frontend
```bash
npm install
npm run dev
```

## Testing

### Backend

Tests use `pytest` with an in-memory SQLite database, so they don't touch your local `folioink.db` file.

```bash
cd backend
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
pytest
```

Currently covers the `/api/projects` routes (GET/POST) — 10 tests. As new routes (e.g. `/api/entries`) are added, tests should be added under `backend/test/`.

### Frontend

Not set up yet — planned: Vitest + React Testing Library for component tests, Playwright for E2E once more screens exist.

## License

Apache License 2.0 — see [LICENSE](LICENSE).
21 changes: 20 additions & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ python run.py

Сервер поднимается на `http://localhost:5000`

### Тестовые данные (опционально)
### Тестовые данные

```bash
python seed.py
Expand All @@ -53,6 +53,25 @@ python seed.py
| macOS | `~/Library/Application Support/folio.ink/` |
| Linux | `~/.local/share/folio.ink/` |

## Тестирование

### Backend

Тесты используют `pytest` с in-memory SQLite базой, поэтому они не трогают локальный файл `folioink.db`.

```bash
cd backend
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
pytest
```

Сейчас покрывает роуты `/api/projects` (GET/POST) — 10 тестов. При добавлении новых роутов (например `/api/entries`) тесты нужно добавлять в `backend/test/`.

### Frontend

Пока не настроено — планируется: Vitest + React Testing Library для компонентных тестов, Playwright для E2E когда появится больше экранов.

### Frontend

```bash
Expand Down
Loading