Commit Graph

133 Commits

Author SHA1 Message Date
Steve Korshakov
9e73fea852 fix: make github user id unique 2025-09-19 20:55:16 -07:00
Steve Korshakov
d032ec1596 ref: extract github connect and disconnect to a separate action, shared eventRouter, copy username to the account on connect and remove on disconnect, make github profile unique 2025-09-19 20:38:48 -07:00
Steve Korshakov
79b97c1b88 fix: fix friendship 2025-09-19 18:50:21 -07:00
Steve Korshakov
b8bc0734a0 ref: improve friendship endpoints 2025-09-17 22:25:06 -07:00
Steve Korshakov
aaff5dcaf4 feat: add social network friendship API
- Add UserRelationship model with unidirectional relationships
- Implement friendship service with GitHub requirement
- Add REST endpoints for friend requests, acceptance, and listing
- Add single relationship-updated WebSocket event
- Support batch profile fetching with consistent schemas

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2025-09-18 04:52:57 +00:00
Steve Korshakov
fbd8e57ed6 feat: add access keys 2025-09-16 22:50:47 -07:00
Steve Korshakov
86bf8bf03c wip: working on artifacts 2025-09-16 22:35:09 -07:00
Steve Korshakov
e961407993 feat: add supportsv2 2025-09-10 20:03:57 -07:00
Steve Korshakov
ae583ffaff Merge branch 'main' of https://github.com/slopus/happy-server 2025-09-08 23:35:38 -07:00
Steve Korshakov
b38afbb003 feat: add revenuecat and elevenlabs secrets 2025-09-08 23:35:05 -07:00
Kirill Dubovitskiy
c1c632e002 feat: add voice token endpoint with RevenueCat paywall
- Add POST /v1/voice/token endpoint for 11Labs voice authentication
- Integrate RevenueCat subscription validation (pro entitlement required)
- Skip paywall in development (NODE_ENV=development)
- Fetch 11Labs conversation tokens for authorized users
- Return allowed:false for users without subscription
- Add NODE_ENV=development to .env.dev for local testing

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2025-09-08 04:04:48 -07:00
Steve Korshakov
d4570c6b8f feat: add machine data encryption key and new-machine update 2025-09-07 22:28:49 -07:00
Steve Korshakov
31bb2892f2 feat: data encryption key 2025-09-07 22:04:59 -07:00
Steve Korshakov
a2fa1dbd01 feat: add update version 2025-09-02 19:09:53 -07:00
Kirill Dubovitskiy
f1fc61c0cf devx: run server locally with s3 minio container 2025-09-01 15:53:12 -07:00
Steve Korshakov
ee48abb737 ref: working on connected accounts 2025-09-01 15:32:10 -07:00
Steve Korshakov
02949fa615 ref: move socket handlers 2025-09-01 15:00:39 -07:00
Steve Korshakov
80a3a64d84 fix: fix broken rpc 2025-09-01 14:51:24 -07:00
Steve Korshakov
c40801b329 ref: move socket handlers 2025-09-01 14:49:56 -07:00
Steve Korshakov
96dd69d360 ref: move routes 2025-09-01 14:38:48 -07:00
Steve Korshakov
acec634e49 ref: move account, connect and session routes 2025-09-01 14:22:50 -07:00
Steve Korshakov
270042d132 wip: extract routes 2025-09-01 14:12:09 -07:00
Steve Korshakov
5379043a14 ref: moving files around 2025-09-01 14:04:30 -07:00
Steve Korshakov
2dada58228 fix: fix missing timeouts 2025-09-01 11:57:27 -07:00
Steve Korshakov
15762fc706 fix: better domain for files 2025-08-28 23:40:32 -07:00
Steve Korshakov
bbea119fab fix: fix timeout 2025-08-27 10:29:11 -07:00
Steve Korshakov
2a3bdb3452 feat: implement v2 sessions sync endpoints with better pagination
- Add GET /v2/sessions/active - returns only active sessions
- Add GET /v2/sessions - cursor-based pagination with changedSince filter
- Use consistent ID-based sorting (desc) for predictable pagination
- changedSince is just a filter, doesn't affect pagination mechanics
- Remove lastMessage field from all v2 endpoints for smaller payloads
- Simple opaque cursor format: cursor_v1_{sessionId}

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 10:23:17 -07:00
Steve Korshakov
0f222cfd98 fix: properly handle empty bodies for DELETE/GET requests
Improve content type parser to handle HTTP methods correctly:
- DELETE and GET requests with empty bodies return undefined (no parsing)
- Other HTTP methods with empty bodies return empty object
- Add method and URL to error logging for better debugging
- Prevents JSON parsing errors on legitimate empty DELETE requests

Fixes the GitHub disconnect endpoint which uses DELETE without body.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 00:28:43 -07:00
Steve Korshakov
5ede024b4c fix: handle empty JSON bodies in content type parser
Fix "Unexpected end of JSON input" error by:
- Check for empty/whitespace-only body before parsing
- Return empty object for empty bodies instead of failing
- Add detailed error logging for debugging JSON parse failures
- Prevent crashes on malformed or empty request bodies

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 00:27:32 -07:00
Steve Korshakov
bf15353dd0 fix: fix cors 2025-08-27 00:01:57 -07:00
Steve Korshakov
13a6e4a0a9 ref: update scope 2025-08-26 23:52:16 -07:00
Steve Korshakov
42f2f30b6a feat: remove avatar on GitHub disconnect
Update GitHub disconnect endpoint to also remove user avatar:
- Clear avatar field in database (set to Prisma.JsonNull)
- Include avatar removal in account update broadcast
- Update logging to reflect avatar removal

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-26 23:38:09 -07:00
Steve Korshakov
5269de150a feat: add GitHub account disconnect endpoint
Add DELETE /v1/connect/github endpoint to disconnect GitHub accounts by:
- Deleting GitHub user token from database
- Removing account link (githubUserId = null)
- Broadcasting disconnect event to connected clients
- Using database transaction for atomicity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-26 23:18:05 -07:00
Steve Korshakov
2d1ce37a59 fix: fix upload path 2025-08-26 23:03:43 -07:00
Steve Korshakov
9ad11b8f9e feat: resolve public url for avatar 2025-08-26 22:39:28 -07:00
Steve Korshakov
4a8f7447e9 debug: add logs 2025-08-26 22:21:31 -07:00
Steve Korshakov
a5fcf38d6d feat: handle avatar, first name and last name 2025-08-26 22:17:11 -07:00
Steve Korshakov
86c0a03bfc fix: fix image 2025-08-26 21:56:03 -07:00
Steve Korshakov
8156f958a3 fix: fix missing deps 2025-08-26 21:54:13 -07:00
Steve Korshakov
83ef6a13c2 fix: trying to fix tweetnacl again 2025-08-26 21:52:13 -07:00
Steve Korshakov
d92a421259 wip: add files, fix tweetnacl in esm 2025-08-26 21:46:55 -07:00
Steve Korshakov
65d83403cd fix: github fix 2025-08-26 21:07:17 -07:00
Steve Korshakov
838ba63c89 fix: fix github verifier 2025-08-26 21:03:31 -07:00
Steve Korshakov
25d64f8edd fix: api 2025-08-26 20:57:12 -07:00
Steve Korshakov
382f531d72 fix: fix logger 2025-08-26 20:53:33 -07:00
Steve Korshakov
f8cd32b4f4 debug: more state logging 2025-08-26 20:51:45 -07:00
Steve Korshakov
4040325524 fix: better logger 2025-08-26 20:48:27 -07:00
Steve Korshakov
25724eac23 wip: add some error logging to the server 2025-08-26 20:47:38 -07:00
Steve Korshakov
8158668190 wip: working on account profile 2025-08-26 20:39:55 -07:00
Steve Korshakov
305f91c6bd feat: healthcheck 2025-08-26 20:23:00 -07:00