ThoughtFlow turns unstructured thoughts into organized priorities, projects, and next actions. This version includes a web app, FastAPI backend, PostgreSQL-ready storage, OpenAI organization, offline support, and Capacitor iOS packaging.
- Frontend: Vite, HTML, CSS, and JavaScript
- API: FastAPI and SQLAlchemy
- Storage: SQLite locally, PostgreSQL in production
- AI: OpenAI Responses API with structured output
- Mobile: Capacitor for iOS
- Offline: localStorage plus a service worker
The local deterministic organizer remains available whenever the API or OpenAI is unavailable.
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reloadAdd an OPENAI_API_KEY to backend/.env to enable AI organization. Without it, the API uses the local organizer.
For PostgreSQL, set:
DATABASE_URL=postgresql+psycopg://thoughtflow:thoughtflow@localhost:5432/thoughtflowAlternatively, run the API and PostgreSQL together:
docker compose up --buildIn another terminal:
npm install
cp .env.example .env
npm run devOpen http://localhost:5173.
DISCLAIMER: iPhone app will not be published because of the $99/year Apple Developer Fee. However, this tool was built with that as the final intent.
Install the full Xcode application from the Mac App Store first. Then:
npm run ios:sync
npm run ios:openIn Xcode:
- Select the
Apptarget. - Choose your Apple Developer team under Signing & Capabilities.
- Confirm the bundle identifier
com.darinbrion.thoughtflowis available. - Run the app in an iPhone simulator.
- Use Product > Archive when ready for TestFlight.
For a deployed API, create .env.production before running npm run ios:sync:
VITE_API_URL=https://your-thoughtflow-api.example.com- iOS share sheet for thoughts
- High-priority local reminders
- Light haptic feedback
- Deep-link capture through
thoughtflow://capture?text=... - Safe-area-aware layouts
- Offline capture and cached app shell
- Keep
OPENAI_API_KEYon the backend only. - Use hosted PostgreSQL and set
DATABASE_URLon the API host. - Restrict
ALLOWED_ORIGINSto the deployed web domain and Capacitor origins. - Add authentication before storing real users' private thoughts in production.
- Publish a privacy policy before TestFlight or App Store submission.