From 454001cca88ee1b1e011f73cf48399a7e1bc2c7c Mon Sep 17 00:00:00 2001 From: null Date: Sat, 28 Mar 2026 16:59:24 -0500 Subject: [PATCH] Added md files for gemini --- .gitignore | 1 + GEMINI.md | 26 +++++++++++++++++++++++++ game/GEMINI.md | 41 ++++++++++++++++++++++++++++++++++++++++ microservices/GEMINI.md | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 .gitignore create mode 100644 GEMINI.md create mode 100644 game/GEMINI.md create mode 100644 microservices/GEMINI.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0ac3ed --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.aider* diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 0000000..e99309c --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,26 @@ +# Promiscuity - Project Overview + +This project is a multi-layered application consisting of a Godot-based game and a backend powered by .NET microservices and MongoDB. + +## Project Structure + +- `game/`: The Godot 4.5 game project. +- `microservices/`: ASP.NET Core 8.0 microservices providing backend logic (Auth, Character, Inventory, Locations, etc.). +- `.gitea/workflows/`: CI/CD pipelines for deploying microservices to Kubernetes. + +## Core Mandates + +- **Godot Development**: Follow guidelines in `game/GEMINI.md`. +- **Microservices Development**: Follow guidelines in `microservices/GEMINI.md`. +- **Infrastructure**: Deployment is handled via K8s. Dockerfiles are located in each microservice directory. + +## Getting Started + +- **Microservices**: Each microservice can be run individually or via the `micro-services.sln` solution file. They require a MongoDB instance (default: `mongodb://127.0.0.1:27017`). +- **Game**: Open `game/project.godot` in Godot Engine 4.5+. + +## Shared Conventions + +- **Naming**: Use PascalCase for C# (microservices) and snake_case for GDScript (game), as is idiomatic for each platform. +- **Documentation**: Maintain `DOCUMENTS.md` in microservice directories for API shapes and document models. +- **Communication**: The game communicates with microservices via HTTP/REST. diff --git a/game/GEMINI.md b/game/GEMINI.md new file mode 100644 index 0000000..0ac7675 --- /dev/null +++ b/game/GEMINI.md @@ -0,0 +1,41 @@ +# Godot Game Development - GEMINI.md + +This directory contains the Godot 4.5 game project for "Promiscuity". + +## Core Mandates + +- **Engine Version**: Godot 4.5 (Forward Plus). +- **Language**: GDScript is the primary scripting language. C# is enabled but used only when performance or specific library needs arise. +- **Naming Conventions**: + - Files/Folders: `snake_case.gd`, `snake_case.tscn`. + - Variables/Functions: `snake_case`. + - Constants: `SCREAMING_SNAKE_CASE`. + - Classes: `PascalCase`. +- **Autoloads**: Use the established singletons for global state and services: + - `AuthState`: JWT authentication and session. + - `CharacterService`: API calls for character management. + - `QuestManager`: Game quest progression. + - `DialogSystem`: UI dialog and interaction. +- **Node Paths**: Prefer `unique names` (%NodeName) or `@onready` variables for node references. Avoid fragile string paths. + +## Asset Pipeline + +- **Models**: Blender files (`.blend`) and GLB files are supported. Blender integration is preferred for easy editing. +- **Audio**: Use `.ogg` for music/loops and `.wav` for short sound effects. +- **UI**: Themes are stored in `themes/`. Adhere to established UI patterns. + +## Project Organization + +- `scenes/`: Scene files and associated scripts. + - `Characters/`: Player and NPC scenes. + - `Levels/`: Game world/environments. + - `UI/`: Menus, HUDs, and UI components. +- `assets/`: Raw assets (textures, models, audio). +- `addons/`: Third-party plugins (e.g., `simplegrasstextured`). + +## Best Practices + +- **Signals**: Use signals for decoupled communication between nodes. +- **Resources**: Encapsulate data in custom `Resource` scripts for modularity. +- **Tool Scripts**: Use `@tool` carefully for editor-side logic. +- **Physics**: Use `_physics_process` for movement and interaction logic. diff --git a/microservices/GEMINI.md b/microservices/GEMINI.md new file mode 100644 index 0000000..caa2043 --- /dev/null +++ b/microservices/GEMINI.md @@ -0,0 +1,42 @@ +# Microservices Development - GEMINI.md + +This directory contains the .NET 8 microservices for the backend. + +## Core Mandates + +- **Framework**: ASP.NET Core 8.0+. +- **Database**: MongoDB (via `MongoDB.Driver`). +- **Authentication**: JWT (Bearer token). +- **Communication**: REST APIs (HTTP). +- **Naming Conventions**: + - Namespace: `[ServiceName]Api` (e.g., `AuthApi`). + - Project: `[ServiceName]Api.csproj`. + - Classes/Methods: `PascalCase`. + - DTOs/Models: `PascalCase` with meaningful suffixes (e.g., `UserCreateRequest`). + +## Project Structure + +Each microservice follows a standard layout: +- `Controllers/`: API endpoint definitions. +- `Models/`: Database entities and DTOs. +- `Services/`: Business logic and data access (e.g., `UserService.cs`). +- `Properties/`: Configuration and launch settings. +- `k8s/`: Kubernetes manifests for the service. +- `DOCUMENTS.md`: Crucial for tracking API and document shapes. + +## Best Practices + +- **Dependency Injection**: Use `AddSingleton` for long-lived services like database clients/wrappers and `AddScoped` for per-request logic. +- **Async/Await**: Use asynchronous operations for all I/O bound tasks (DB, HTTP). +- **Security**: + - Never hardcode secrets; use `IConfiguration` and environment variables. + - Use `Bcrypt.Net-Next` for password hashing. + - Ensure all sensitive endpoints are protected by `[Authorize]`. +- **API Documentation**: Always maintain Swagger/OpenAPI documentation. Swagger should be available at `/swagger` in development and potentially production environments. +- **Logging**: Use structured logging (standard `ILogger` or Serilog). + +## Maintenance + +- Update `DOCUMENTS.md` whenever you change a database schema or API request/response shape. +- Ensure `Dockerfile` and `k8s/` manifests are kept in sync with code changes. +- All microservices are unified under the `micro-services.sln` solution file.