Commit Graph

66 Commits

Author SHA256 Message Date
d39e3405bb Added packets folder for the packet-service until I automate generation at build time 2025-07-23 13:59:08 -04:00
f10cac3794 Did some code clean-up
Added TODOs for some changes that need to be made
2025-07-23 13:52:50 -04:00
9fcd1741de Updated chat handler to use the MessageType enum values instead of numbers
Added local_id tracking for the packet service
Added mob spawning packet in response to game logic events (only for a NearbyUpdate event right now)
2025-07-22 00:23:56 -04:00
7cac892c2a Fixed typo 2025-07-22 00:12:53 -04:00
d906cd8d64 Tons of fixes
Added movement updates
Updated how entities are checked
Events sending between packet service all the way to the logic service
2025-07-02 15:37:10 -04:00
87b233d366 Updated Common Item data proto 2025-06-10 14:24:56 -04:00
9088c04bc8 More debug messages
Fixed typo
2025-06-07 03:04:37 -04:00
aa2be43f4e Refactor
Updated handlers by spliting the TcpStream in half to allow reading and writing data at the same time.
This fixes an issue where you are unable to get chat messages until the client sends a packet to the server

Fixed client id's by adding the id manager
Added shout chat handling
2025-06-07 00:36:02 -04:00
ad6ba2c8e6 More work.
Added chat service
Updated packet service to pass the tcp stream around in a Arc type.
Updated character position data to not require multiplying the coords
Added more debug logs
Added an interceptor for gRPC comms with the chat server
Updated build and push script for the chat server changes
2025-06-06 17:52:29 -04:00
a8755bd3de Add comprehensive documentation and unit tests
Documentation:
- Add detailed README files for all services (auth, character, database, launcher, packet, utils, world)
- Create API documentation for the database service with detailed endpoint specifications
- Document database schema and relationships
- Add service architecture overviews and configuration instructions

Unit Tests:
- Implement comprehensive test suite for database repositories (user, character, session)
- Add gRPC service tests for database interactions
- Create tests for packet service components (bufferpool, connection, packets)
- Add utility service tests (health check, logging, load balancer, redis cache, service discovery)
- Implement auth service user tests
- Add character service tests

Code Structure:
- Reorganize test files into a more consistent structure
- Create a dedicated tests crate for integration testing
- Add test helpers and mock implementations for easier testing
2025-04-09 13:29:53 -04:00
d47d5f44b1 - add: Not hardcoded object tag for the user when switching to the in game map 2025-03-21 23:24:32 -04:00
4046f56191 - removed: api-service
- removed: session-service
- updated: moved health check out of consul registration
- updated: get service info to pull the service from the default namespace for the service account
- updated: the rest of the services to be able to handle the new database tables
2025-03-20 22:53:49 -04:00
98b8d412e7 - update: logging system to only show logs from the app and not any 3rd party dependencies 2025-03-19 02:13:02 -04:00
89a1e93dc3 - update: service port env variable to just be named service_port 2025-03-18 11:57:51 -04:00
f4bc414ebd - update: code update to use kube api instead of consul 2025-03-18 02:00:11 -04:00
81068759e5 - update: docker compose to add custom networks
- add: get service endpoints by using consul dns
2025-03-10 06:09:26 -04:00
ae04d2bf5b - add: gRPC health check for gRPC services 2025-03-10 03:56:47 -04:00
14c6aa485a - add: redis cache refresh function sets the ttl for a key
- update: session service refresh session function now just updates the ttl of the session instead of calling set
2025-03-09 17:08:56 -04:00
0dc69bcfcf - add: metrics exporting 2025-03-09 17:06:58 -04:00
c4d3da1f94 - fix: formatting for packet routing 2025-03-09 17:04:13 -04:00
dfd98e96d2 - add: money is now sent with the character data sent to the client 2025-03-09 13:53:26 -04:00
8ba8fce20b - update: schema now sets the skills column to prevent a crash
- update: frontend to only pass the session id
- update: launcher to pass the session correctly
- update: validate session response now returns the session id and user id to the requester
- update: auth client based on session id instead of a jwt token
2025-03-08 13:47:53 -05:00
b6f2d3f456 - chore: ran cargo fix on the codebase 2025-03-07 21:03:15 -05:00
c0e8dba715 - update: imports
- add: cache and cache data for docker-compose.yml
2025-03-04 14:01:22 -05:00
4f28e92685 - update: proto files and code referencing them to make it more clear what service they are 2025-02-27 22:42:54 -05:00
a9a6c52b00 - update: proto files to move common stuff into common proto files
- update: made changes for new proto paths
- add: skills to character table
- add: load and send skills to client from db
- add: chat proto
2025-02-27 22:11:17 -05:00
292a298205 - update: grab version info to register from the cargo package
- update: docker volume to persist the registered service IDs
- update: consul service id function to store the service id in the services folder
2025-01-29 14:25:53 -05:00
b5e16f0bef - add: mouse cmd packet handling
- add: change map handler
- update: logout handler to send the reply packet
- update: character id list change from u8 to u32
2025-01-28 22:48:11 -05:00
09c10efb46 - update: equipped item list to use the constant instead of a "magic" number 2025-01-28 17:31:44 -05:00
f4a421b7cb - fix: no longer fail to parse packet if multiple were received in one read call
- update: max packet size to match client
2025-01-08 12:36:27 -05:00
32fe2d65a7 - add: select character now actually sends the character data to the client
- add: character data response when a character is requested from the service
2025-01-08 03:46:08 -05:00
6d35d15ac3 - add: ability to refresh the current session
- add: delete type to delete character request
- add: ability to update key in redis
- add: handle alive packet to refresh the session
- fix: delete now actually returns the time remaining correctly
- fix: character list now has the correct time until character deletion
2025-01-08 02:03:27 -05:00
db868cc1ac - add: Character service now loads the data from the database and sends it in the character list packet
- add: character id list to the connection state for tracking the real character database id's for when the client requests actions on the character
- fix: sql error when trying to create a character
2025-01-07 22:16:47 -05:00
cb6ee657f0 - add: Character service can now actually create a character correctly in the database
- add: character db client to allow the character service to talk to the database service
- update: character.proto to make character data shared
2025-01-07 13:41:07 -05:00
9f63a5fd3a - update: moved signal handler into utils crate to make it easier to update
- fix: windows compile issue due to exposed unix signal
2025-01-05 22:49:55 -05:00
f8243fe68c - fix: character service to compile issues with new packet structure 2025-01-05 22:17:12 -05:00
2153583813 - update: item_list type changed to a fixed array in character list reply 2025-01-05 20:57:13 -05:00
fb8f9cccf4 - update: function calls to character service in the packet service now actually use the call the correct requests
- update: character select list builds the equipped item list dynamically
2025-01-05 17:18:05 -05:00
4a826d2a46 - update: packet router to have the various services needed for the packets to be local to it.
- add: character service grpc client calls
2025-01-04 17:45:54 -05:00
00468e9600 - update: generate_service_id function call now takes in the service name so the id file isn't always called utils_service_id.txt 2024-12-27 19:04:54 -05:00
17f653c629 - update: packet server character handler
- add: character grpc client interface to packet service
2024-12-27 19:00:06 -05:00
0bf8fd9bee - add: handlers for character create/delete/select 2024-12-21 18:30:05 -05:00
c40293e354 - update: character id type in connection state to match the client 2024-12-21 18:28:15 -05:00
7c8e5a52c6 - fix: panic on network client disconnect before actually logging in 2024-12-21 18:27:34 -05:00
f55ca79410 - add: join server handler
- add: validate session function to validate the session status
2024-12-21 15:39:51 -05:00
069a471bbb - fix: incorrect packet ids for Join Server Token req and reply 2024-12-21 15:37:30 -05:00
0777bd4605 - fix: user_id and session id were not being saved in the state correctly
- add: server and channel id to connection state
2024-12-20 17:48:02 -05:00
e0114fd832 - add: get_connection_mut function to allow modifying the connection state 2024-12-20 17:44:22 -05:00
e3fb186a44 - fix: when shutting down a docker container, the services would not deregister from consul correctly 2024-12-20 17:42:50 -05:00
18afa71d74 - add: logout grpc function
- add: logout packet handler
- add: connection state and service for storing connection data
- add: session service calls to auth-service
- fix: compile error on database service due to moved redis cache
2024-12-20 14:46:00 -05:00