This project provides a minimal FastAPI backend with a Vite + React frontend. It implemenets a GitHub Actions workflow for running tests on every push and pull request using pytest and vitest. AGENTS.MD is used for improved PRs from OpenAI Codex.
- Python 3.10+
- Node.js 18+
All commands should be run from the frontend
directory.
-
Clone the repository:
git clone https://github.com/gshklovs/react-codex-starter.git
-
Navigate to the frontend directory:
cd frontend
-
Install frontend dependencies:
npm install
-
Install backend dependencies:
npm run install:backend
Start both frontend and backend servers with a single command:
cd frontend
npm run dev:all
Or run them separately:
Frontend:
cd frontend
npm run dev
Backend:
cd backend
uvicorn app.main:app --reload
The frontend will be available at http://localhost:5173 The backend API will be available at http://localhost:8000
cd backend
pytest
cd frontend
npm test
The backend tests verify the /api/hello
route. The frontend tests use Vitest and React Testing Library to check component rendering and behavior.
This repository uses GitHub Actions to run tests automatically on every push and pull request. The workflow installs dependencies and executes the same test commands described above.
To run the tests locally:
pip install -r backend/requirements.txt
npm install --prefix frontend
cd backend && pytest
cd frontend && npm test
If any step fails, the workflow marks the commit as failed on GitHub.