Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
83f31a9
Initial plan
Copilot Oct 21, 2025
bff56ad
Implement Cognito auth and wallet RPCs module
Copilot Oct 21, 2025
378c910
Add comprehensive README for runtime module
Copilot Oct 21, 2025
32ef415
Add comprehensive examples and finalize implementation
Copilot Oct 21, 2025
b06b775
Add implementation summary and complete module
Copilot Oct 21, 2025
4407df1
Merge pull request #3 from intelli-verse-x/copilot/implement-nakama-w…
devashishbadlani Oct 21, 2025
b4e7a2b
Initial plan
Copilot Oct 22, 2025
5a2291a
Add persistent leaderboard creation RPC module
Copilot Oct 22, 2025
b7ea534
Add documentation for leaderboard RPC module
Copilot Oct 22, 2025
8a1d841
Merge pull request #4 from intelli-verse-x/copilot/create-persistent-…
devashishbadlani Oct 22, 2025
15b8f8c
Merge branch 'heroiclabs:master' into master
devashishbadlani Oct 28, 2025
0636f95
Revert "Merge pull request #3 from intelli-verse-x/copilot/implement-…
devashishbadlani Oct 30, 2025
eebfe14
Merge branch 'heroiclabs:master' into master
devashishbadlani Nov 4, 2025
45425a4
Initial plan
Copilot Nov 5, 2025
1c2754f
Add Dockerfile and config.yaml for CI-CD
Copilot Nov 5, 2025
d3eb025
Improve Dockerfile to handle TypeScript compilation and module copying
Copilot Nov 5, 2025
b4c583d
Merge pull request #7 from intelli-verse-x/copilot/add-dockerfile-for…
devashishbadlani Nov 5, 2025
70ae5fc
Initial plan
Copilot Nov 5, 2025
4b09aea
Update config.yaml with complete production-ready configuration for E…
Copilot Nov 5, 2025
b29869c
Merge pull request #8 from intelli-verse-x/copilot/update-config-yaml…
devashishbadlani Nov 5, 2025
0f3e64b
Initial plan
Copilot Nov 5, 2025
69212d4
Add tsconfig.json, reorganize modules, fix Dockerfile
Copilot Nov 5, 2025
cd699bf
Update tsconfig.json to allow compilation with type errors
Copilot Nov 5, 2025
ead7da4
Update Dockerfile to handle TypeScript compilation errors gracefully
Copilot Nov 5, 2025
a81da1f
Add comprehensive documentation for Dockerfile changes
Copilot Nov 5, 2025
01f6fc4
Improve TypeScript error handling with better logging
Copilot Nov 5, 2025
088d695
Add implementation complete documentation
Copilot Nov 5, 2025
bb0bb0b
Merge pull request #9 from intelli-verse-x/copilot/fix-dockerfile-for…
devashishbadlani Nov 5, 2025
406ce2b
Add InitModule with custom RPC registration
devashishbadlani Nov 6, 2025
1a1286b
Refactor Dockerfile for improved build process
devashishbadlani Nov 9, 2025
0872f37
Refactor Dockerfile for improved clarity and structure
devashishbadlani Nov 9, 2025
363745a
Merge branch 'heroiclabs:master' into master
devashishbadlani Nov 9, 2025
ad6be09
Initial plan
Copilot Nov 10, 2025
8c97a45
Fix leaderboard RPC implementation with correct API URLs and proper m…
Copilot Nov 10, 2025
acabd4b
Merge pull request #10 from intelli-verse-x/copilot/implement-leaderb…
devashishbadlani Nov 10, 2025
c088cb0
Initial plan
Copilot Nov 10, 2025
dcc88c1
Add Lua implementation of leaderboard RPC with correct module structure
Copilot Nov 10, 2025
046a852
Add comprehensive README for Lua leaderboard RPC implementation
Copilot Nov 10, 2025
a249cbe
Add TypeScript to Lua conversion guide documentation
Copilot Nov 10, 2025
a011b37
Merge pull request #11 from intelli-verse-x/copilot/fix-leaderboard-r…
devashishbadlani Nov 10, 2025
98bbe40
required-changes
ayush5475 Nov 10, 2025
2815b00
runtime modules changes
ayush5475 Nov 11, 2025
1c35b21
Initial plan
Copilot Nov 12, 2025
2e46be6
Initial plan
Copilot Nov 12, 2025
5406d92
Implement copilot leaderboard system with all modules
Copilot Nov 12, 2025
c505565
Add comprehensive README documentation for copilot modules
Copilot Nov 12, 2025
2f5cfd9
Implement Cognito User ↔ Wallet Mapping core modules
Copilot Nov 12, 2025
ecef23f
Add comprehensive documentation for Cognito wallet mapping
Copilot Nov 12, 2025
680e52a
Add security summary and complete implementation
Copilot Nov 12, 2025
9f6933b
Add comprehensive implementation summary
Copilot Nov 12, 2025
9f6d825
Merge pull request #14 from intelli-verse-x/copilot/extend-nakama-lea…
devashishbadlani Nov 13, 2025
3a62909
Initial plan
Copilot Nov 13, 2025
fe81bdb
Consolidate modules into single index.js and add comprehensive Unity …
Copilot Nov 13, 2025
aa31580
Merge pull request #16 from intelli-verse-x/copilot/resolve-conflicts…
devashishbadlani Nov 13, 2025
2d42ac8
Merge branch 'master' into copilot/map-cognito-users-to-wallets
devashishbadlani Nov 13, 2025
2e96325
Merge pull request #15 from intelli-verse-x/copilot/map-cognito-users…
devashishbadlani Nov 13, 2025
0f0d6bf
Initial plan
Copilot Nov 13, 2025
cc01b16
Add comprehensive multi-game backend system with daily rewards, missi…
Copilot Nov 13, 2025
4dbf931
Add comprehensive documentation and quick reference guide
Copilot Nov 13, 2025
04af306
Add comprehensive system README with quick start guide
Copilot Nov 13, 2025
5aaa477
Add final implementation summary
Copilot Nov 13, 2025
4b7cf76
Merge pull request #17 from intelli-verse-x/copilot/add-master-codex-…
devashishbadlani Nov 13, 2025
4da0bed
Initial plan
Copilot Nov 13, 2025
fabd4a5
Add time-period leaderboards and complete Unity developer guide
Copilot Nov 13, 2025
21a1197
Add leaderboard time-periods documentation and update quick reference
Copilot Nov 13, 2025
f4f75a4
Add complete workflow documentation and build verification
Copilot Nov 13, 2025
c6b630b
Add final implementation summary - All requirements complete
Copilot Nov 13, 2025
0b8a1ff
Update MASTER_SYSTEM_DOCUMENTATION with leaderboard system - Implemen…
Copilot Nov 13, 2025
e1e2677
Add Groups/Clans system and comprehensive sample game integration guide
Copilot Nov 14, 2025
6892e9a
Merge pull request #19 from heroiclabs/master
devashishbadlani Nov 14, 2025
911391d
Merge pull request #18 from intelli-verse-x/copilot/add-leaderboard-d…
devashishbadlani Nov 14, 2025
2decdba
Initial plan
Copilot Nov 14, 2025
76d80ee
Add comprehensive Unity integration guide and clean up documentation
Copilot Nov 14, 2025
5f2e515
Add implementation status report and quick reference guide
Copilot Nov 14, 2025
6df70ed
Update main README with comprehensive copilot module documentation
Copilot Nov 14, 2025
20f8b60
Add task completion summary document
Copilot Nov 14, 2025
7c19719
Merge pull request #20 from intelli-verse-x/copilot/extend-persistent…
devashishbadlani Nov 14, 2025
45831db
Initial plan
Copilot Nov 14, 2025
ed8ab8d
Consolidate all documentation into three comprehensive markdown files
Copilot Nov 14, 2025
268c628
Merge pull request #22 from intelli-verse-x/copilot/implement-leaderb…
devashishbadlani Nov 14, 2025
5f9a2e3
Initial plan
Copilot Nov 14, 2025
260b3b0
feat: Add Push Notification system with AWS SNS/Pinpoint integration
Copilot Nov 14, 2025
f3d0bd7
docs: Add comprehensive push notification documentation to all three …
Copilot Nov 14, 2025
b685976
Merge pull request #23 from intelli-verse-x/copilot/modify-nakama-bac…
devashishbadlani Nov 14, 2025
c680d7c
Fix link formatting in integration document
devashishbadlani Nov 14, 2025
2526d05
Initial plan
Copilot Nov 14, 2025
dca0d41
Add comprehensive documentation for copilot leaderboard and social fe…
Copilot Nov 14, 2025
eabca19
Initial plan
Copilot Nov 14, 2025
689f923
Merge pull request #24 from intelli-verse-x/copilot/implement-score-s…
devashishbadlani Nov 14, 2025
fdbab30
Add comprehensive ESM documentation for Nakama JavaScript runtime
Copilot Nov 14, 2025
c09c644
Add complete working examples for ESM modules and TypeScript configur…
Copilot Nov 14, 2025
1c2c808
Add ESM migration guide and update README with migration information
Copilot Nov 14, 2025
1260954
Add comprehensive solution summary for ESM migration
Copilot Nov 14, 2025
689f9e0
Convert all JavaScript modules from CommonJS to ESM syntax
Copilot Nov 14, 2025
3048582
Merge pull request #26 from intelli-verse-x/copilot/convert-commonjs-…
devashishbadlani Nov 14, 2025
04fc0f1
Initial plan
Copilot Nov 14, 2025
b957c6d
Consolidate all Nakama modules into single V8-compatible index.js
Copilot Nov 14, 2025
980803b
Clean up temporary consolidation files
Copilot Nov 14, 2025
5324a16
Fix all module object references to use direct function calls
Copilot Nov 14, 2025
0f706eb
Add verification documentation for Nakama module fix
Copilot Nov 14, 2025
56f3438
Merge pull request #28 from intelli-verse-x/copilot/debug-nakama-serv…
devashishbadlani Nov 14, 2025
6ea5238
api request
XpertWebApp Nov 15, 2025
336402b
Initial plan
Copilot Nov 15, 2025
2b8a4c2
Add three new RPCs: create_or_sync_user, create_or_get_wallet, submit…
Copilot Nov 15, 2025
0cc2464
Add comprehensive documentation for identity, wallets, leaderboards, …
Copilot Nov 15, 2025
b149e3e
Add complete documentation: API reference, sample game tutorial, inte…
Copilot Nov 15, 2025
0cb197b
Add implementation summary document
Copilot Nov 15, 2025
eac5d9a
Add comprehensive documentation on separating leaderboard scores from…
Copilot Nov 15, 2025
3e4281f
Merge pull request #29 from intelli-verse-x/copilot/refactor-nakama-s…
devashishbadlani Nov 15, 2025
b2da3c3
Initial plan
Copilot Nov 16, 2025
a38f3b0
Implement standard player RPCs with comprehensive documentation
Copilot Nov 16, 2025
4b87744
Update README with new standard player RPCs documentation
Copilot Nov 16, 2025
0db1005
Add implementation complete summary document
Copilot Nov 16, 2025
7efac5b
Merge pull request #30 from intelli-verse-x/copilot/document-missing-…
devashishbadlani Nov 16, 2025
52b3f50
Initial plan
Copilot Nov 16, 2025
e8e58d4
Add missing get_all_leaderboards RPC implementation
Copilot Nov 16, 2025
e9ec38e
Update documentation with get_all_leaderboards RPC
Copilot Nov 16, 2025
8f3508d
Update README with get_all_leaderboards and core RPCs summary
Copilot Nov 16, 2025
d133e65
Add implementation verification document
Copilot Nov 16, 2025
1ac924f
Merge pull request #31 from intelli-verse-x/copilot/fix-nakama-server…
devashishbadlani Nov 16, 2025
7fcde1f
Initial plan
Copilot Nov 16, 2025
2bb490d
Fix leaderboard auto-creation in submit_score_and_sync RPC
Copilot Nov 16, 2025
333fc02
Add API endpoint corrections documentation
Copilot Nov 16, 2025
bbd4036
Add Unity developer quick reference guide
Copilot Nov 16, 2025
de9ba76
Merge pull request #33 from intelli-verse-x/copilot/fix-leaderboard-u…
devashishbadlani Nov 16, 2025
94e9ae7
Initial plan
Copilot Nov 16, 2025
a5f68fa
Implement chat functionality and fix storage userId issues
Copilot Nov 16, 2025
a3275cc
Add leaderboard auto-creation to separate module and create comprehen…
Copilot Nov 16, 2025
f3a8b15
Add implementation complete summary and finalize all changes
Copilot Nov 16, 2025
d83ae10
Merge pull request #34 from intelli-verse-x/copilot/implement-group-c…
devashishbadlani Nov 16, 2025
ae571d3
Initial plan
Copilot Nov 16, 2025
70c2fdd
Add multi-game RPCs for QuizVerse and LastToLive
Copilot Nov 16, 2025
d057662
Add implementation summary documentation
Copilot Nov 16, 2025
2d7fd48
Add additional MEGA CODEX features: catalog, guilds, chat, analytics,…
Copilot Nov 16, 2025
9ea97fd
Update documentation with MEGA CODEX v3 features
Copilot Nov 16, 2025
e06fd23
Merge pull request #37 from intelli-verse-x/copilot/add-lasttolive-rpcs
devashishbadlani Nov 16, 2025
753c652
Initial plan
Copilot Nov 16, 2025
2874586
Add game registry system and clarify gameID vs gameTitle usage
Copilot Nov 16, 2025
9608801
Add RPC quick reference guide and fix syntax error
Copilot Nov 16, 2025
f05800b
Add implementation summary document
Copilot Nov 16, 2025
7b956dc
Add automatic game registry sync and enhance wallet metadata tracking
Copilot Nov 17, 2025
70d67e0
Merge pull request #38 from intelli-verse-x/copilot/fix-game-id-refer…
devashishbadlani Nov 17, 2025
7c453f1
fix nakama
devashishbadlani Nov 17, 2025
6e7f4fd
fixes leaderboard bug
devashishbadlani Nov 17, 2025
2bf9e5d
fix gaps with quizverse
devashishbadlani Nov 18, 2025
0a1b841
Initial plan
Copilot Nov 18, 2025
bb10fc9
Implement check_geo_and_update_profile RPC with Google Maps integration
Copilot Nov 18, 2025
f4642d1
Add GOOGLE_MAPS_API_KEY environment variable to docker-compose
Copilot Nov 18, 2025
36150ab
Add comprehensive documentation for geolocation RPC
Copilot Nov 18, 2025
995a741
Add implementation summary and finalize geolocation pipeline
Copilot Nov 18, 2025
b04db42
Add quick start guide for geolocation pipeline
Copilot Nov 18, 2025
1c8e12a
Add comprehensive requirements verification checklist
Copilot Nov 18, 2025
9d1ffd1
Merge pull request #39 from intelli-verse-x/copilot/extend-player-met…
devashishbadlani Nov 18, 2025
9ffd3cb
Initial plan
Copilot Nov 19, 2025
4ef1184
Fix leaderboard username to use Nakama account username instead of id…
Copilot Nov 19, 2025
ada5fed
Remove accidentally committed binary and update .gitignore
Copilot Nov 19, 2025
bb880ca
Merge pull request #40 from intelli-verse-x/copilot/fix-leaderboards-…
devashishbadlani Nov 19, 2025
6ae3c81
Doc updates
devashishbadlani Nov 20, 2025
71adbe4
update from main
XpertWebApp Nov 21, 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
36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
nakama
nakama-server
.cookie
local.yml

Expand Down Expand Up @@ -716,3 +717,6 @@ MigrationBackup/
.ionide/

# End of https://www.toptal.com/developers/gitignore/api/go,angular,node,intellij+all,visualstudiocode,visualstudio,sublimetext,windows,linux,macos

# TypeScript build output
data/modules/build/
242 changes: 242 additions & 0 deletions API_ENDPOINTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
# Push Notifications API Endpoints

## Base URL
```
http://your-nakama-server:7350/v2/rpc/{rpc_id}
```

## Authentication
```
Authorization: Bearer {session_token}
```

---

## 1. Register Push Token

**Endpoint:** `POST /v2/rpc/push_register_token`

**Description:** Register a device push token for receiving push notifications. Unity clients send raw device tokens, Nakama forwards to AWS Lambda to create SNS endpoints.

**Request Headers:**
```
Content-Type: application/json
Authorization: Bearer {session_token}
```

**Request Body:**
```json
{
"gameId": "123e4567-e89b-12d3-a456-426614174000",
"platform": "ios",
"token": "apns_device_token_here"
}
```

**Platform Values:**
- `ios` - iOS devices (APNS)
- `android` - Android devices (FCM)
- `web` - Web/PWA (FCM)
- `windows` - Windows devices (WNS)

**Success Response (200):**
```json
{
"success": true,
"userId": "user-uuid",
"gameId": "123e4567-e89b-12d3-a456-426614174000",
"platform": "ios",
"endpointArn": "arn:aws:sns:us-east-1:123456789012:endpoint/APNS/myapp/abc123",
"registeredAt": "2024-11-14T17:00:00Z"
}
```

**Error Response:**
```json
{
"success": false,
"error": "Error message here"
}
```

**cURL Example:**
```bash
curl -X POST "http://your-nakama-server:7350/v2/rpc/push_register_token" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-d '{
"gameId": "123e4567-e89b-12d3-a456-426614174000",
"platform": "ios",
"token": "your_device_token"
}'
```

---

## 2. Send Push Notification

**Endpoint:** `POST /v2/rpc/push_send_event`

**Description:** Send a push notification to a user's registered devices. Server-side triggered notifications.

**Request Headers:**
```
Content-Type: application/json
Authorization: Bearer {session_token}
```

**Request Body:**
```json
{
"targetUserId": "123e4567-e89b-12d3-a456-426614174000",
"gameId": "123e4567-e89b-12d3-a456-426614174001",
"eventType": "daily_reward_available",
"title": "Daily Reward Available!",
"body": "Claim your daily login bonus now!",
"data": {
"rewardType": "coins",
"amount": 100
}
}
```

**Event Types:**
- `daily_reward_available` - Daily login bonus available
- `mission_completed` - Mission/objective completed
- `streak_warning` - Streak about to expire
- `friend_request` - New friend request
- `friend_online` - Friend came online
- `challenge_invite` - Friend challenged you
- `match_ready` - Matchmaking found opponents
- `wallet_reward_drop` - Currency/items received
- `new_season` - New season/quiz pack available

**Success Response (200):**
```json
{
"success": true,
"targetUserId": "123e4567-e89b-12d3-a456-426614174000",
"gameId": "123e4567-e89b-12d3-a456-426614174001",
"eventType": "daily_reward_available",
"sentCount": 2,
"totalEndpoints": 2,
"timestamp": "2024-11-14T17:00:00Z"
}
```

**Partial Success Response:**
```json
{
"success": true,
"sentCount": 1,
"totalEndpoints": 2,
"errors": [
{
"platform": "ios",
"error": "Lambda returned code 500"
}
]
}
```

**Error Response:**
```json
{
"success": false,
"error": "No registered push endpoints for user"
}
```

**cURL Example:**
```bash
curl -X POST "http://your-nakama-server:7350/v2/rpc/push_send_event" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-d '{
"targetUserId": "123e4567-e89b-12d3-a456-426614174000",
"gameId": "123e4567-e89b-12d3-a456-426614174001",
"eventType": "daily_reward_available",
"title": "Daily Reward Available!",
"body": "Claim your daily login bonus now!",
"data": {}
}'
```

---

## 3. Get Registered Endpoints

**Endpoint:** `POST /v2/rpc/push_get_endpoints`

**Description:** Get all registered push notification endpoints for the authenticated user.

**Request Headers:**
```
Content-Type: application/json
Authorization: Bearer {session_token}
```

**Request Body:**
```json
{
"gameId": "123e4567-e89b-12d3-a456-426614174000"
}
```

**Success Response (200):**
```json
{
"success": true,
"userId": "user-uuid",
"gameId": "123e4567-e89b-12d3-a456-426614174000",
"endpoints": [
{
"userId": "user-uuid",
"gameId": "123e4567-e89b-12d3-a456-426614174000",
"platform": "ios",
"endpointArn": "arn:aws:sns:us-east-1:123456789012:endpoint/APNS/myapp/abc123",
"createdAt": "2024-11-14T16:00:00Z",
"updatedAt": "2024-11-14T16:00:00Z"
},
{
"userId": "user-uuid",
"gameId": "123e4567-e89b-12d3-a456-426614174000",
"platform": "android",
"endpointArn": "arn:aws:sns:us-east-1:123456789012:endpoint/GCM/myapp/def456",
"createdAt": "2024-11-14T15:00:00Z",
"updatedAt": "2024-11-14T15:00:00Z"
}
],
"count": 2,
"timestamp": "2024-11-14T17:00:00Z"
}
```

**cURL Example:**
```bash
curl -X POST "http://your-nakama-server:7350/v2/rpc/push_get_endpoints" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-d '{
"gameId": "123e4567-e89b-12d3-a456-426614174000"
}'
```

---

## Error Codes

- `400 Bad Request` - Invalid request payload or missing required fields
- `401 Unauthorized` - Authentication required or invalid token
- `404 Not Found` - RPC endpoint not found
- `500 Internal Server Error` - Server error

## Notes

- All `gameId` and `userId` fields must be valid UUID v4 format
- Users can register multiple devices (e.g., iPhone + iPad + Android)
- The `push_send_event` endpoint sends notifications to all registered devices for the user
- Lambda Function URLs must be configured in Nakama environment variables:
- `PUSH_LAMBDA_URL` - For endpoint registration
- `PUSH_SEND_URL` - For sending notifications

Loading