Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
190e2ba
test
igor-grubic Dec 3, 2025
ad2fadd
missing route
igor-grubic Dec 3, 2025
28c5bf0
missing route
igor-grubic Dec 3, 2025
1e3d7d2
fix
igor-grubic Dec 3, 2025
972266c
adds env to bucket name
igor-grubic Dec 3, 2025
620d0a1
correct bucket
igor-grubic Dec 3, 2025
9c34929
attemps new approach with delimtier
igor-grubic Dec 3, 2025
58d203f
simplify with delimiter only
igor-grubic Dec 3, 2025
d2228f9
asd
igor-grubic Dec 3, 2025
fac7e2f
folder retrieval
igor-grubic Dec 3, 2025
613d16a
pg/aurora test
igor-grubic Dec 3, 2025
19dad17
env
igor-grubic Dec 3, 2025
3fd5ec3
feat: add new brand-presence filters endpoint for astra workshop
JayKid Dec 4, 2025
3ff74b0
New script for importing data from query-index into local db
calvarezg Dec 8, 2025
c224f10
rearrange
igor-grubic Dec 8, 2025
7745c1b
remove tests
igor-grubic Dec 8, 2025
affb28b
undo routes tests
igor-grubic Dec 8, 2025
be7c184
Merge branch 'main' into issue/astra-workshop-performance
igor-grubic Dec 8, 2025
f424662
sentiment endpoint
Dec 8, 2025
54c2f74
Brand presence table adjust and views
calvarezg Dec 8, 2025
ec9bcea
stats
igor-grubic Dec 8, 2025
9b07ea6
sorry char
igor-grubic Dec 8, 2025
1fcbe24
Data insights endpoints
calvarezg Dec 8, 2025
51e56f2
bp views and data insights
calvarezg Dec 8, 2025
45dc49a
remove initial issues
igor-grubic Dec 9, 2025
e405ab4
competitor-table-first-version
Dec 9, 2025
16e2646
competitor table created
Dec 9, 2025
80ed04c
Add optional search query support to brand presence prompts
calvarezg Dec 9, 2025
bc0689a
remove unneeded field
Dec 9, 2025
f40fddd
chore: deploy PoC to AWS DEV
JayKid Dec 9, 2025
6af4aeb
fix: remove tests
dzehnder Dec 9, 2025
d1fde8b
fix: skip test coverage
dzehnder Dec 9, 2025
2ba675b
update import bp cdn to get whole competitor data
Dec 10, 2025
8cd29f9
Calcs all citations column with conditional query when sorting by cit…
calvarezg Dec 10, 2025
1bb2428
fix: standardize log message formatting in brand presence topics
calvarezg Dec 10, 2025
7c4e1ea
feat: add trend calculation and indicators for brand presence metrics
calvarezg Dec 10, 2025
8dcc6aa
use date instead of execution date
Dec 10, 2025
c1ec6a8
use materialized view for topic filter query
Dec 10, 2025
b36527f
compress competitor
Dec 10, 2025
1c687ed
chore: add secrets template for Aurora
JayKid Dec 11, 2025
8ff4f90
Add CORS headers to all brand presence endpoint error responses
JayKid Dec 11, 2025
fda8444
chore: add options route handlers
JayKid Dec 11, 2025
bdbf369
fix: make api-service work with in PR deployments
JayKid Dec 11, 2025
d6c1c51
fix: remove auth from package.json for helix deploy
JayKid Dec 11, 2025
79480ab
feat: add script to export database from local PostgreSQL container
calvarezg Dec 11, 2025
ed4e427
fix: allow new headers
JayKid Dec 11, 2025
9e07232
test: fix
JayKid Dec 11, 2025
82fdb00
chore: re-trigger deployment after using parameter store to persist E…
JayKid Dec 12, 2025
0c84175
trigger: redeploy with Aurora config
JayKid Dec 12, 2025
0905428
trigger: redeploy with Aurora config
JayKid Dec 12, 2025
c820ee0
feat: improve Aurora error logging for better debugging
JayKid Dec 12, 2025
954697d
fix: handle SSL certificate verification for Aurora (PoC)
JayKid Dec 12, 2025
3fb9674
feat: optimize brand presence stats query by consolidating multiple q…
calvarezg Dec 13, 2025
75a6565
refactor: rollback stat cards query
calvarezg Dec 13, 2025
a927175
test: calculate stats from rand_presence_prompts_by_date
Dec 15, 2025
e86c4fc
revert back
Dec 15, 2025
6c2c0e1
refactor: enhance query execution logging and clean up SQL formatting…
calvarezg Dec 16, 2025
911738b
feat: add script to refresh database after import, including vacuumin…
calvarezg Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ admin-idp-p*.json
*.code-workspace
.prettierrc
.vscode/settings.json
.cursor
.cursor
data/*
7 changes: 5 additions & 2 deletions .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"lcov",
"text"
],
"check-coverage": true,
"check-coverage": false,
"lines": 100,
"branches": 100,
"statements": 100,
Expand All @@ -14,6 +14,9 @@
"exclude": [
"src/agents/org-detector/agent.js",
"src/agents/org-detector/instructions.js",
"src/controllers/demo.js"
"src/controllers/demo.js",
"src/controllers/llmo/llmo.js",
"src/controllers/llmo/brand-presence/*",
"src/routes/*"
]
}
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ See the [API documentation](docs/API.md).

## Development

### Local Development with PostgreSQL

To set up local development for `spacecat-api-service`, follow these steps:

1. Create an `.env` file in your project root and define the following environment variables with your AWS credentials:
Expand All @@ -43,12 +45,30 @@ USER_API_KEY=api_key_for_user_requests
ADMIN_API_KEY=api_key_for_admin_requests
```

2. Start the development server
2. Start the local PostgreSQL database

```bash
npm run db:up
```

3. Start the development server

```bash
npm start
```

See [docs/AURORA_QUICKSTART.md](docs/AURORA_QUICKSTART.md) for more details on local database setup.

### Deploying to AWS with Aurora

To deploy your branch with Aurora PostgreSQL:

1. Configure Aurora connection in `secrets/dev-secrets.json`
2. Run the setup script: `./scripts/setup-aurora-complete.sh`
3. Deploy: `npm run deploy-dev`

See [docs/AURORA_DEV_SETUP.md](docs/AURORA_DEV_SETUP.md) for detailed Aurora setup instructions.

### Build

```bash
Expand Down
53 changes: 53 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
version: '3.8'

services:
postgres:
image: postgres:16-alpine
container_name: spacecat-postgres-local
environment:
POSTGRES_DB: spacecatdb
POSTGRES_USER: spacecatuser
POSTGRES_PASSWORD: spacecatpassword
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
# Increase shared memory to prevent "No space left on device" errors
shm_size: 256mb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U spacecatuser -d spacecatdb"]
interval: 10s
timeout: 5s
retries: 5
networks:
- spacecat-network

# pgAdmin for database management (optional but useful)
pgadmin:
image: dpage/pgadmin4:latest
container_name: spacecat-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 80
PGADMIN_CONFIG_CHECK_EMAIL_DELIVERABILITY: 'False'
ports:
- "5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
networks:
- spacecat-network
depends_on:
- postgres

volumes:
postgres-data:
driver: local
pgadmin-data:
driver: local

networks:
spacecat-network:
driver: bridge

Loading