Installation Manual
AT-AT Installation Manual
Section titled “AT-AT Installation Manual”This document guides you through the complete local installation and execution of the API Threat Assessment Tool (AT-AT).
Prerequisites
Section titled “Prerequisites”- Node.js ≥ 18
- Python ≥ 3.10
- npm ≥ 9
- Git
- Recommended: PowerShell (Windows) or bash (Linux/macOS)
1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/YourOrg/API-Threat-Assessment-Tool.gitcd API-Threat-Assessment-Tool
2. Create .env
Files
Section titled “2. Create .env Files”Each of the three components — frontend
, api
, and backend
— require .env
files. Below are their templates:
frontend/.env
Section titled “frontend/.env”SUPABASE_URL=https://your-project.supabase.coSUPABASE_KEY=your-supabase-service-keyJWT_SECRET=your-secretFRONTEND_URL=http://localhost:3000PORT=3000HOST=0.0.0.0DANGEROUSLY_DISABLE_HOST_CHECK=true
api/.env
Section titled “api/.env”SUPABASE_URL=https://our-link.supabase.coSUPABASE_KEY=your-supabase-service-keyJWT_SECRET=your-secretFRONTEND_URL=http://localhost:3000PORT=3001
backend/.env
Section titled “backend/.env”PORT=3002FRONTEND_URL=http://localhost:3000SUPABASE_URL=https://our-link.supabase.coSUPABASE_KEY=your-supabase-service-keyJWT_SECRET=your-secretFRONTEND_URL=http://localhost:3000
3. Setup and Run Backend (Python)
Section titled “3. Setup and Run Backend (Python)”cd backendpython -m venv venv.\venv\Scripts\Activate # Windows# or: source venv/bin/activate # macOS/Linux
pip install -r requirements.txtpython main.py
4. Setup and Run API (Node.js)
Section titled “4. Setup and Run API (Node.js)”cd apinpm installnode index.js
5. Setup and Run Frontend (React)
Section titled “5. Setup and Run Frontend (React)”cd frontendnpm installnpm run start:client
If the start:client
script fails with a host error, ensure your .env
includes:
HOST=0.0.0.0DANGEROUSLY_DISABLE_HOST_CHECK=true
6. Test in Browser
Section titled “6. Test in Browser”Open:
http://localhost:3000
You should see the AT-AT UI.
- Upload a spec to test backend connectivity
- Verify
localhost:3001
andlocalhost:5001
are active
Common Troubleshooting
Section titled “Common Troubleshooting”Issue | Fix |
---|---|
allowedHosts error | Add HOST=0.0.0.0 and DANGEROUSLY_DISABLE_HOST_CHECK=true |
Supabase not loading | Ensure all .env files have correct SUPABASE_URL and SUPABASE_KEY |
Python crash on dotenv | Run pip install python-dotenv |
Final Notes
Section titled “Final Notes”- GitHub Actions CI/CD is available and runs tests on pull requests.
- This setup is for local development as used in Demo 3.