Lychee is a Flask-based, encyclopedia-style web application focused on truth and factual accuracy. Users submit articles and the community votes to verify and validate facts, aiming to rival major encyclopedias like Wikipedia. Optional OpenAI Codex/GPT integration can assist in drafting and refining content.
- Python 3.10 or later
- SQLite 3 (for the default built-in database)
-
Clone the repository
git clone <repo-url> lychee cd lychee
-
Create and activate a virtual environment (recommended)
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env # Edit .env and set your OPENAI_API_KEY and FLASK_SECRET_KEY -
Initialize the database
python3 create_db.py- Run the development server
python3 main.pyTo run on a different port (if 8000 is in use), set the PORT environment variable, e.g.:
PORT=8001 python3 main.pyFLASK_SECRET_KEYis required (no insecure default). Use a long random value.- Article content is rendered with Jinja auto-escaping (safe by default). If you later add rich-text HTML/Markdown rendering, you must sanitize to prevent stored XSS.
- Open in your browser
Visit
http://localhost:8000(or the host/port printed by Flask).
- The
.envfile is listed in.gitignoreand should not be committed to source control. - In production (e.g. Cloud Run), set
OPENAI_API_KEYandFLASK_SECRET_KEYvia your platform's environment/secret management.
This project is released under the MIT License. See LICENSE for details.