Skip to main content

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

  1. Initialize (first time only):

    inkwell init
    
  2. Start the application:

    inkwell start
    
  3. Open your browser to http://localhost:7891

Usage

Commands

  • inkwell start - Start the application (backend on port 7891)
  • inkwell start --dev - Start in development mode
  • inkwell start --no-browser - Start without opening browser
  • inkwell status - Show application status
  • inkwell init - Initialize configuration and database
  • inkwell --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 check
  • GET /api/items - Get all items
  • POST /api/items - Create new item
  • GET /api/items/{id} - Get specific item
  • PUT /api/items/{id} - Update item
  • DELETE /api/items/{id} - Delete item
  • GET /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

  1. Make changes to the code
  2. If you modify the frontend, run ./build.sh
  3. Test with pip install -e . and inkwell start

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inkwell_app-0.1.9.tar.gz (459.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inkwell_app-0.1.9-py3-none-any.whl (465.9 kB view details)

Uploaded Python 3

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

Hashes for inkwell_app-0.1.9.tar.gz
Algorithm Hash digest
SHA256 275be0df515ed4a6c0c7c0ed98ae8f6f50bf834366045bb424afd014e6f39d22
MD5 9c10e80f69f7a67226a34bc99d014986
BLAKE2b-256 f1dfe405a2f5307258bc1834a5998c35ddc67af79cf0f8fa13a0008f9bede1df

See more details on using hashes here.

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

Hashes for inkwell_app-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 80525e21c46e1a6064b2038d4d940dfdea76654bb5932294560a4ddb943f5feb
MD5 d1bffdf3b51db3241a28428162cb48d1
BLAKE2b-256 ce8289882688808ce823eb828b4efe2315cc722336b24d1d97403efd67fbff3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page