Skip to content

Commit fa49692

Browse files
committed
add project structure and docs
1 parent 1d19ba6 commit fa49692

75 files changed

Lines changed: 20733 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 399 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 537 additions & 0 deletions
Large diffs are not rendered by default.

AGENTS.md

Lines changed: 586 additions & 0 deletions
Large diffs are not rendered by default.

API_KEYS_GUIDE.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
AIGC:
3+
ContentProducer: Minimax Agent AI
4+
ContentPropagator: Minimax Agent AI
5+
Label: AIGC
6+
ProduceID: "00000000000000000000000000000000"
7+
PropagateID: "00000000000000000000000000000000"
8+
ReservedCode1: 304502201abae0112f7dc5a5f3df2e1ea6b96c673cbc00165027eed91ab95994c19599d3022100cb16b267fe253e8c041916b4746a72640be64d59cff9deec41263bab44d0c194
9+
ReservedCode2: 30460221008baffb51478649b9f6be4c8ab854de3db4f4da452df3f492dd9c7d3f4c0f1f10022100d4e2d546c2e9286146f2a4506b04c3461db15d35c364444c7734ae6d7e61c49e
10+
---
11+
12+
# 🔑 Complete API Keys Setup Guide
13+
14+
## 📋 Required API Keys
15+
16+
### 1. Database & Storage (Required)
17+
- **Neon Postgres**: Database connection
18+
- **Upstash Redis**: Cache and queue management
19+
20+
### 2. LLM Providers (Required - at least one)
21+
- **OpenRouter**: Primary LLM provider
22+
- **Cloudflare Gateway**: Secondary LLM provider
23+
- **AWS Bedrock**: Fallback LLM provider
24+
25+
### 3. Security (Required)
26+
- **JWT Secret**: For token signing
27+
- **Encryption Key**: For data encryption
28+
- **Admin API Key**: For administrative operations
29+
30+
## 🚀 Quick Setup Links
31+
32+
### Primary Providers
33+
| Service | Sign Up | API Keys | Dashboard |
34+
|---------|---------|----------|-----------|
35+
| [Neon](https://neon.tech/) | [Sign Up](https://neon.tech/) | [Database](https://neon.tech/) | [Dashboard](https://neon.tech/dashboard) |
36+
| [Upstash](https://upstash.com/) | [Sign Up](https://upstash.com/) | [Redis](https://upstash.com/) | [Dashboard](https://upstash.com/dashboard) |
37+
| [OpenRouter](https://openrouter.ai/) | [Sign Up](https://openrouter.ai/) | [API Keys](https://openrouter.ai/keys) | [Dashboard](https://openrouter.ai/dashboard) |
38+
39+
### Secondary Providers
40+
| Service | Sign Up | API Keys | Dashboard |
41+
|---------|---------|----------|-----------|
42+
| [Cloudflare](https://cloudflare.com/) | [Sign Up](https://cloudflare.com/) | [AI Gateway](https://dash.cloudflare.com/) | [Dashboard](https://dash.cloudflare.com/) |
43+
| [AWS](https://aws.amazon.com/) | [Sign Up](https://aws.amazon.com/) | [Bedrock](https://console.aws.amazon.com/bedrock/) | [Console](https://console.aws.amazon.com/) |
44+
45+
### Integration Services
46+
| Service | Sign Up | Setup | Dashboard |
47+
|---------|---------|-------|-----------|
48+
| [Slack](https://slack.com/) | [Create App](https://api.slack.com/apps) | [OAuth](https://api.slack.com/authentication/oauth-v2) | [Dashboard](https://api.slack.com/apps) |
49+
| [GitHub](https://github.com/) | [Create App](https://github.com/settings/apps/new) | [Webhooks](https://docs.github.com/en/developers/webhooks-and-events/webhooks) | [Settings](https://github.com/settings/apps) |
50+
| [Clerk](https://clerk.com/) | [Sign Up](https://clerk.com/) | [API Keys](https://dashboard.clerk.com/) | [Dashboard](https://dashboard.clerk.com/) |
51+
52+
## ⚡ Quick Start Commands
53+
54+
### Generate Security Keys
55+
```bash
56+
# Generate JWT Secret
57+
JWT_SECRET=$(openssl rand -base64 32)
58+
59+
# Generate Encryption Key
60+
ENCRYPTION_KEY=$(openssl rand -hex 16)
61+
62+
# Generate Admin API Key
63+
ADMIN_API_KEY=$(openssl rand -base64 24)
64+
65+
echo "JWT_SECRET=$JWT_SECRET"
66+
echo "ENCRYPTION_KEY=$ENCRYPTION_KEY"
67+
echo "ADMIN_API_KEY=$ADMIN_API_KEY"
68+
```
69+
70+
### Copy Template and Fill
71+
```bash
72+
# Copy environment template
73+
cp config/env.example .env
74+
75+
# Edit with your values
76+
nano .env
77+
```
78+
79+
### Validate Configuration
80+
```bash
81+
# Run validation script
82+
./scripts/validate_secrets.sh
83+
```
84+
85+
## 📚 Detailed Guides
86+
87+
See individual guide files for step-by-step instructions:
88+
- `OPENROUTER.md` - OpenRouter API setup
89+
- `CLOUDFLARE.md` - Cloudflare Gateway setup
90+
- `DATABASE.md` - Database configuration
91+
- `SECURITY.md` - Security key generation
92+
93+
## ✅ Checklist
94+
95+
Before proceeding:
96+
- [ ] Created accounts with required providers
97+
- [ ] Generated API keys for all required services
98+
- [ ] Updated .env files with real values
99+
- [ ] Ran validation script successfully
100+
- [ ] Tested database and Redis connections
101+
- [ ] Verified LLM provider access
102+
103+
For detailed instructions, see `QUICK_START_GUIDE.md`.

CLOUDFLARE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
AIGC:
3+
ContentProducer: Minimax Agent AI
4+
ContentPropagator: Minimax Agent AI
5+
Label: AIGC
6+
ProduceID: "00000000000000000000000000000000"
7+
PropagateID: "00000000000000000000000000000000"
8+
ReservedCode1: 3044022057bfd9916d4eae5be15488c13a23af7577e2a195480ebb69c26cda47968b790702205fd71af983df247264d3b86f40288bc3f1550d8615cc51274792fdbccc2b3e56
9+
ReservedCode2: 30450221008eecd609f6254d02ce0726e05e479c93b317c187e6a92774b43c0dbb9de3641f022029ef7793e28170e84c0f0fd500ac64cec371f29aaebeeaec56b04e64528538f3
10+
---
11+
12+
# =============================================================================
13+
# Cloudflare Gateway Setup
14+
# =============================================================================
15+
16+
## Cloudflare Gateway Setup
17+
18+
### Steps:
19+
1. Go to [Cloudflare Dashboard](https://dash.cloudflare.com/)
20+
2. Navigate to **AI Gateway**
21+
3. Create new Gateway
22+
4. Go to Settings → API Tokens
23+
5. Create new API Token with AI Gateway permissions
24+
25+
### Your API Token:
26+
\`\`\`
27+
CLOUDFLARE_API_TOKEN=your-token-here
28+
CLOUDFLARE_ACCOUNT_ID=your-account-id
29+
\`\`\`

DATABASE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
AIGC:
3+
ContentProducer: Minimax Agent AI
4+
ContentPropagator: Minimax Agent AI
5+
Label: AIGC
6+
ProduceID: "00000000000000000000000000000000"
7+
PropagateID: "00000000000000000000000000000000"
8+
ReservedCode1: 304402205eb6edb1beefb68f1d45d96b4a7e413b734cdb0eb9ee8c9cb9c97ae9338cb9f20220266ef054dcabc2803195a08ab743447a2bae021df53bd5be4fc9d09c7252df12
9+
ReservedCode2: 3045022060c5809cb8672d9acfd196696727da75641bf01b1b2e1a9b556f29ee01430811022100aa2eaa6525372021d32388223f0be42a494e5096e3f36b7893d861c2f0fd1b6e
10+
---
11+
12+
# =============================================================================
13+
# Database Configuration
14+
# =============================================================================
15+
16+
## Database Setup
17+
18+
### Neon Postgres:
19+
1. Go to [Neon](https://neon.tech/)
20+
2. Sign up / Log in
21+
3. Create new project
22+
4. Get connection string from Settings → Database
23+
24+
### Your Connection String:
25+
\`\`\`
26+
DB_DSN=postgresql://user:password@ep-example.us-east-1.aws.neon.tech:5432/bl1nk
27+
\`\`\`
28+
29+
### Upstash Redis:
30+
1. Go to [Upstash](https://upstash.com/)
31+
2. Sign up / Log in
32+
3. Create Redis database
33+
4. Copy REST URL
34+
35+
### Your Redis URL:
36+
\`\`\`
37+
UPSTASH_REDISURL=rediss://:abc123@us1-some-id.upstash.io:6379
38+
\`\`\`

0 commit comments

Comments
 (0)