Skip to content

FLATLINE is a retro/arcade style medical simulation/game that teaches its players to solve realistic patient cases by giving them the ability to run medical tests and select diagnoses.

Notifications You must be signed in to change notification settings

Adiii581/FLATLINE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

FLATLINE - Don't Let The Pulse Drop!

FLATLINE is a retro/arcade style medical simulation/game that teaches its players to solve realistic patient cases by giving them the ability to run medical tests and select diagnoses.

Tech Stack

  • Frontend: JavaScript, React (Vite), HTML, Tailwind CSS
  • Backend: Python, FastAPI, RestAPI, and Pydantic
  • AI Engine: Google Gemini API (gemini-2.5-flash)

Prerequisites

Before running the game, ensure you have the following installed:

  • Node.js (v16 or higher)
  • Python (v3.9 or higher)
  • A Google Gemini API Key (Get one here)

Installation & Setup

Follow these steps to get the system running locally. You will need two terminal windows open: one for the backend and one for the frontend.

Step 1: Clone the Repository

git clone https://github.com/Adiii581/FLATLINE.git
cd flatline

Step 2: Backend Setup (Terminal 1)

Navigate to the backend directory:

cd backend

Create a virtual environment:

# Windows
python -m venv venv
venv\Scripts\activate

# Mac/Linux
python3 -m venv venv
source venv/bin/activate

Install dependencies:

pip install fastapi uvicorn google-generativeai python-dotenv pydantic

Configure Environment Variables:

Create a file named .env inside the backend folder and add your API key:

GEMINI_API_KEY=your_actual_api_key_here

Start the Server:

python -m uvicorn main:app --reload

The backend should now be running at http://localhost:8000.

Step 3: Frontend Setup (Terminal 2)

Navigate to the project root:

cd frontend

Install Node dependencies:

npm install

Start the React Application:

npm run dev

Open your browser and navigate to the Localhost URL shown in the terminal (usually http://localhost:5173).

How to Play

  • Select Difficulty: Choose Easy, Medium, or Hard.
  • Review the Case: Read the patient's initial symptoms and vitals.
  • Order Tests: Select diagnostic tests from the menu.
  • Diagnose: Once you have enough information, submit a diagnosis. Be careful, if the diagnosis is wrong then the patient's condition worsens.
  • Flatline: If the patient's vitality hits 0, the game is over.

About

FLATLINE is a retro/arcade style medical simulation/game that teaches its players to solve realistic patient cases by giving them the ability to run medical tests and select diagnoses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published