Added md files for gemini #10
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.aider*
|
||||||
26
GEMINI.md
Normal file
26
GEMINI.md
Normal file
@ -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.
|
||||||
41
game/GEMINI.md
Normal file
41
game/GEMINI.md
Normal file
@ -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.
|
||||||
42
microservices/GEMINI.md
Normal file
42
microservices/GEMINI.md
Normal file
@ -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.
|
||||||
Loading…
x
Reference in New Issue
Block a user