This project is a small full-stack application built to fulfill the requirements of the recruitment exercise. It uses a Vue.js/TypeScript frontend to send text to a FastAPI/Python backend, which in turn gets a summary from the Google Gemini API.
It is recommended to use a new virtual environment for the backend to avoid dependency conflicts.
First, set up and run the FastAPI server.
# 1. Navigate to the backend directory
# 2. (Recommended) Create and activate a new Python environment
# 3. Install dependencies from the lock file
pip install -r requirements.txt
# 4. Set up the Gemini API Key
# - Rename .env.example to .env
# - Add your Gemini API Key to the .env file
# 5. Run the development server
uvicorn main:app --reloadThe backend API will now be running on http://127.0.0.1:8000.
(Note: This project was developed with Python 3.10)
In a separate terminal, set up and run the Vue.js frontend.
# 1. Navigate to the frontend directory
# 2. Install dependencies
npm install
# 3. Run the development server
npm run devThe frontend application will now be running on http://localhost:5173. You can open this URL in your browser to use the application.
The unit tests for the backend can be run using pytest.
# 1. Navigate to the backend directory
# 2. (Ensure your environment is activated and dependencies are installed)
# 3. Run pytest
pytest -v