Contributions are welcome via fork and Pull Request only. Direct pushes to main are not accepted — the branch is protected.
Follow the steps in the README to run both the backend and the frontend locally.
Make sure you have a valid GROQ_API_KEY in backend/.env before starting.
backend/ FastAPI API — routes, services, Groq integration
frontend/ React + Vite UI — components, styles, i18n
You must fork the repository. Direct pushes to this repo are not permitted for external contributors.
-
Fork the repository on GitHub.
-
Clone your fork and create a feature branch:
git clone https://github.com/your-username/TextLens.git cd TextLens git checkout -b feat/your-feature-name -
Make your changes. Keep commits focused — one logical change per commit.
-
Test manually — start both backend and frontend and verify nothing is broken.
-
Open a Pull Request from your fork against the
mainbranch of this repository. Include a clear description of what changed and why.
All PRs are reviewed before merging. PRs that push directly to main or bypass the fork workflow will be closed.
- Add new analysis types in
backend/services/llm_service.py(prompt + function) and register them inbackend/routes/analyze.py. - Keep prompts deterministic (
temperature=0.3) and always include aRespond in {lang}instruction. - Wrap all Groq calls in
_wrap_errorsor the_chat_streamtry/except block so HTTP errors stay consistent.
- All user-visible strings must go through
i18n.js. Add the key to every language block (or at least English — the fallback handles the rest). - New result types need an entry in
TYPE_ICONS,getTypeLabel,dataKey,getPlainTextand a case inResultBody. - Streaming types must be added to
STREAM_TYPES(frontend) andSTREAM_TYPES(backend route).
- Follow the existing code style — no linter is enforced, but keep indentation and naming consistent.
- Do not commit
node_modules/,__pycache__/,.env, or.venv.
Please use the GitHub issue templates:
- Bug report — unexpected behaviour, errors, or broken features.
- Feature request — ideas for new analysis types, UI improvements, or integrations.
By contributing you agree that your changes will be released under the MIT License.