A command line tool that launches a local React website with FastAPI backend
Project description
Inkwell
A command line tool that launches a local React website with FastAPI backend.
Features
- ๐ Easy Installation: Install via pip
- ๐ Full-Stack: React frontend with FastAPI backend
- ๐๏ธ Database: SQLite database for data persistence
- ๐ฅ๏ธ CLI Interface: Control via command line from any directory
- ๐ฑ Web Interface: Interact through the browser
- ๐ง Development Mode: Hot reload during development
Installation
# Install directly from GitHub (pre-built)
pip install git+https://github.com/soshhowell/inkwell.git
Quick Start
-
Initialize (first time only):
inkwell init -
Start the application:
inkwell start -
Open your browser to
http://localhost:7891
Usage
Commands
inkwell start- Start the application (backend on port 7891)inkwell start --dev- Start in development modeinkwell start --no-browser- Start without opening browserinkwell status- Show application statusinkwell init- Initialize configuration and databaseinkwell --help- Show help
Ports
- Backend (Production): http://localhost:7891
- Frontend (Development): http://localhost:7892
API Endpoints
The FastAPI backend provides these endpoints:
GET /api/health- Health checkGET /api/items- Get all itemsPOST /api/items- Create new itemGET /api/items/{id}- Get specific itemPUT /api/items/{id}- Update itemDELETE /api/items/{id}- Delete itemGET /docs- Interactive API documentation
Development
Quick Development Setup (Recommended)
Use the development script to run both frontend and backend without pip install:
# Start development environment (no pip install needed)
./run.sh
This will:
- Install dependencies automatically
- Start backend on port 7893
- Start frontend on port 7894
- Use separate development database (
.dev_database/inkwell_dev.db) - Enable hot reload for both frontend and backend
- Handle cleanup on Ctrl+C
Development URLs:
- ๐ Frontend: http://localhost:7894
- ๐ Backend API: http://localhost:7893
- ๐ API Docs: http://localhost:7893/docs
Manual Development
Frontend Development
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server (runs on port 7892)
npm start
Backend Development
# Start backend in development mode
inkwell start --dev
Building
# Build the React frontend
./build.sh
# The build files will be copied to inkwell/frontend/build/
Configuration
Inkwell stores its configuration and database in ~/.inkwell/:
~/.inkwell/inkwell.db- SQLite database~/.inkwell/config.json- Configuration file (future use)
Architecture
inkwell-internal/
โโโ inkwell/ # Main Python package
โ โโโ cli.py # Click-based CLI
โ โโโ server.py # FastAPI backend
โ โโโ database.py # SQLite database management
โ โโโ config.py # Configuration
โ โโโ frontend/build/ # Built React app (generated)
โโโ frontend/ # React source code
โ โโโ src/ # React components
โ โโโ public/ # Static assets
โ โโโ package.json # Frontend dependencies
โโโ build.sh # Frontend build script
โโโ pyproject.toml # Python package config
โโโ requirements.txt # Python dependencies
Contributing
- Make changes to the code
- If you modify the frontend, run
./build.sh - Test with
pip install -e .andinkwell start
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inkwell_app-0.1.9.tar.gz.
File metadata
- Download URL: inkwell_app-0.1.9.tar.gz
- Upload date:
- Size: 459.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
275be0df515ed4a6c0c7c0ed98ae8f6f50bf834366045bb424afd014e6f39d22
|
|
| MD5 |
9c10e80f69f7a67226a34bc99d014986
|
|
| BLAKE2b-256 |
f1dfe405a2f5307258bc1834a5998c35ddc67af79cf0f8fa13a0008f9bede1df
|
File details
Details for the file inkwell_app-0.1.9-py3-none-any.whl.
File metadata
- Download URL: inkwell_app-0.1.9-py3-none-any.whl
- Upload date:
- Size: 465.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80525e21c46e1a6064b2038d4d940dfdea76654bb5932294560a4ddb943f5feb
|
|
| MD5 |
d1bffdf3b51db3241a28428162cb48d1
|
|
| BLAKE2b-256 |
ce8289882688808ce823eb828b4efe2315cc722336b24d1d97403efd67fbff3d
|