Files
docs/quickstart.mdx
Peter Wood c6eb26037b feat: Add CI/CD setup guide with Gitea Actions for trading analysis application
feat: Implement multi-user support with separate brokerage accounts and user authentication

feat: Configure SSO authentication setup using Google OAuth 2.0 for secure access

refactor: Update index page to reflect new Trading Analysis Dashboard features and descriptions

docs: Enhance quickstart guide for deploying Trading Analysis Dashboard with detailed steps

chore: Add runner configuration for Gitea Actions with logging and container settings
2025-11-14 12:43:09 -05:00

206 lines
4.9 KiB
Plaintext

---
title: "Quickstart"
description: "Get your Trading Analysis Dashboard up and running in minutes"
---
## Get Started in Four Steps
Deploy your trading analysis dashboard and start tracking your portfolio performance.
### Step 1: Prerequisites
<AccordionGroup>
<Accordion icon="docker" title="Install Docker">
Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) which includes Docker Compose. This is required for running the application containers.
</Accordion>
<Accordion icon="key" title="Get Finnhub API Key">
1. Register for a free account at [Finnhub.io](https://finnhub.io/register)
2. Navigate to your dashboard
3. Copy your API key - you'll need this for real-time price updates
<Tip>The free tier includes 60 API calls per minute and real-time US stock quotes</Tip>
</Accordion>
<Accordion icon="google" title="Set up Google OAuth (Optional)">
For secure authentication, create OAuth credentials:
1. Visit [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project
3. Enable Google+ API
4. Create OAuth 2.0 credentials
5. Copy Client ID and Client Secret
See the [SSO Setup Guide](/guides/setup/sso) for detailed instructions.
</Accordion>
</AccordionGroup>
### Step 2: Configure Environment
<Steps>
<Step title="Clone the repository">
```bash
git clone https://your-repo-url/trading-analysis-dashboard.git
cd trading-analysis-dashboard
```
</Step>
<Step title="Copy environment file">
```bash
cp .env.docker .env
```
</Step>
<Step title="Edit .env file">
Update the following values:
```env .env
# Finnhub Configuration
FINNHUB_API_KEY=your_finnhub_api_key_here
# Database Configuration
POSTGRES_PASSWORD=choose_secure_password
# Flask Configuration
FLASK_SECRET_KEY=generate_random_secret_key
# OAuth Configuration (Optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
AUTHORIZED_USERS=your-email@example.com
```
<Warning>Never commit the `.env` file to version control!</Warning>
</Step>
</Steps>
### Step 3: Deploy
<Tabs>
<Tab title="Windows">
```batch
deploy.bat
```
</Tab>
<Tab title="Linux/macOS">
```bash
chmod +x deploy.sh
./deploy.sh
```
</Tab>
<Tab title="Manual">
```bash
docker compose up -d
docker compose ps
```
</Tab>
</Tabs>
<Check>
Wait for all containers to start. This may take a minute for first-time setup.
</Check>
### Step 4: Access and Configure
<Steps>
<Step title="Open the application">
Navigate to `http://localhost:8080` in your browser
</Step>
<Step title="Login (if OAuth enabled)">
Click "Sign in with Google" and authorize the application
</Step>
<Step title="Set up your profile">
Add your brokerage account number in the profile page
</Step>
<Step title="Upload trading data">
Go to the Upload page and import your CSV transaction history
</Step>
</Steps>
## Next Steps
Now that your dashboard is running, explore these features:
<CardGroup cols={2}>
<Card title="Portfolio Management" icon="chart-line" href="/features/portfolio-management">
Add your holdings and track real-time performance
</Card>
<Card title="CSV Upload" icon="file-csv" href="/features/csv-upload">
Import your trading history from your broker
</Card>
<Card title="Trading Analysis" icon="magnifying-glass-chart" href="/features/trading-analysis">
Analyze monthly trading performance and P&L
</Card>
<Card title="API Reference" icon="code" href="/api-reference/introduction">
Integrate with the REST API
</Card>
</CardGroup>
## Common Tasks
### View Logs
```bash
# All services
docker compose logs -f
# Specific service
docker compose logs -f trading_app
```
### Restart Services
```bash
docker compose restart
```
### Update Application
```bash
docker compose pull
docker compose up -d
```
### Backup Database
```bash
docker compose exec postgres pg_dump -U trading_user mining_wood > backup.sql
```
## Troubleshooting
<AccordionGroup>
<Accordion title="Application won't start">
Check the logs for errors:
```bash
docker compose logs trading_app
```
Common issues:
- Missing environment variables
- Database connection failure
- Port 8080 already in use
</Accordion>
<Accordion title="Can't login">
- Verify OAuth credentials are correct in `.env`
- Check that your email is in `AUTHORIZED_USERS`
- Clear browser cookies and try again
</Accordion>
<Accordion title="Prices not updating">
- Verify `FINNHUB_API_KEY` is set correctly
- Check API quota hasn't been exceeded
- Review application logs for API errors
</Accordion>
</AccordionGroup>
<Note>
**Need help?** Check our [deployment guide](/guides/deployment/docker) or [setup guides](/guides/setup/cicd) for more detailed instructions.
</Note>