testing opencode
This commit is contained in:
parent
5f9cab55cd
commit
901568e721
24
AGENTS.md
Normal file
24
AGENTS.md
Normal file
@ -0,0 +1,24 @@
|
||||
# AGENTS.md: Agent Guidelines
|
||||
|
||||
## Build, Lint, Test
|
||||
- Run entrypoint: `python main.py`
|
||||
- No project-wide test/lint commands found; recommend:
|
||||
- Run one test: `pytest test_file.py::test_func` (if pytest added)
|
||||
- Lint: `flake8 .` or `pylint main.py` (if installed)
|
||||
- Requirements: add `requirements.txt` if using dependencies
|
||||
- No environment or shell scripts present.
|
||||
|
||||
## Code Style
|
||||
- Follow [PEP8](https://pep8.org/): 4 spaces per indent, <=79 chars/line
|
||||
- Use explicit imports, not wildcard imports
|
||||
- Place stdlib, 3rd party, and local imports in separate groups
|
||||
- Use type annotations for all public functions/parameters
|
||||
- Snake_case for functions/vars; PascalCase for classes; UPPER_SNAKE for constants
|
||||
- Write docstrings for all public functions/classes
|
||||
- Handle errors with try/except and log exception details
|
||||
- One statement per line; no trailing whitespace
|
||||
- Avoid global state; prefer function/class encapsulation
|
||||
- Place entry code in `if __name__ == '__main__'` block
|
||||
- No Cursor or Copilot rules/configs detected
|
||||
|
||||
_Update this document if configs or standards are added later._
|
||||
26
README.md
26
README.md
@ -1,2 +1,26 @@
|
||||
This is a side project of mine to develop a DND character/item/feat/etc creator mainainter.
|
||||
# DND Character/Item/Feat Creator & Maintainer
|
||||
|
||||
This project is a Dungeons & Dragons 5th Edition (DND5e) companion app focused on character management and creation. It provides a backend structure for modeling, storing, and manipulating DND entities such as characters, items, feats, and other attributes.
|
||||
|
||||
## Features
|
||||
- Define and manage base and derived character attributes based on DND5e rules
|
||||
- Extensible backend ready for API or web interface integration
|
||||
- Support for custom skills, resistances, and multi-stage attribute calculation
|
||||
- User management for storing player profiles and multiple characters
|
||||
|
||||
## Tech Overview
|
||||
- Python backend (main.py entrypoint)
|
||||
- Modular architecture for standalone backend or combined webapp use
|
||||
- Flexible data model designed for expansion
|
||||
|
||||
## Database Model Highlights
|
||||
- USERS: Stores user profiles (UUID, username, password, type, profile picture, flags)
|
||||
- CHARACTERS: Stores character data, linked to user IDs
|
||||
- Detailed separation of base, derived, child, and passive attributes for robust computation and extension
|
||||
|
||||
## Getting Started
|
||||
1. Clone the repo
|
||||
2. Run with `python main.py`
|
||||
3. Add dependencies or tests as needed (see AGENTS.md for agent and style guidelines)
|
||||
|
||||
> This project is evolving! Please see backend/README.md for detailed schema notes. Contributions and suggestions are welcome.
|
||||
@ -5,15 +5,145 @@ the webapp can also be ran.
|
||||
most cases both will be ran
|
||||
|
||||
|
||||
|
||||
### Character Attrinutes (dnd5e)
|
||||
|
||||
|
||||
## Base Attributes
|
||||
base attributes area attr that are not derived at run time. In most if not all cases
|
||||
these will remain the same through the runtime process
|
||||
|
||||
- @name
|
||||
- @level
|
||||
- @race (package of feats)
|
||||
- @class (package of feats)
|
||||
|
||||
|
||||
## Derived Attributes
|
||||
|
||||
- @strength::base
|
||||
- @dexterity::base
|
||||
- @constitution::base
|
||||
- @wisdom::base
|
||||
- @intelligence::base
|
||||
- @charisma::base
|
||||
- @armor::base
|
||||
|
||||
|
||||
(Priority 1, needs to calculate these before all other attribtues)
|
||||
- @strength
|
||||
- @dexterity
|
||||
- @constitution
|
||||
- @wisdom
|
||||
- @intelligence
|
||||
- @charisma
|
||||
|
||||
- @strength::modifier
|
||||
- @dexterity::modifier
|
||||
- @constitution::modifier
|
||||
- @wisdom::modifier
|
||||
- @intelligence::modifier
|
||||
- @charisma::modifier
|
||||
|
||||
- @proficiency
|
||||
|
||||
|
||||
(Priority 2, child derived attributes)
|
||||
- @strength_save
|
||||
- @dexterity_save
|
||||
- @constitution_save
|
||||
- @wisdom_save
|
||||
- @intelligence_save
|
||||
- @charisma_save
|
||||
|
||||
- @hp
|
||||
- @hp_max
|
||||
- @hp_temp
|
||||
- @hit_die
|
||||
- @initative
|
||||
- @armor
|
||||
|
||||
- @fire_resistance
|
||||
- @poison_resistance
|
||||
- @psychic_resistance
|
||||
- @cold_resistance
|
||||
- @thunder_resistance
|
||||
- @acid_resistance
|
||||
- @force_resistance
|
||||
- @radiant_resistance
|
||||
- @necortic_resistance
|
||||
- @bludgeoning_resistance
|
||||
- @piercing_resistance
|
||||
- @slashing_resistance
|
||||
|
||||
str skills
|
||||
- @athletics
|
||||
|
||||
dex skills
|
||||
- @acrobatics
|
||||
- @sleight_of_hand
|
||||
- @stealth
|
||||
|
||||
intelligence Skills
|
||||
- @arcana
|
||||
- @history
|
||||
- @investigation
|
||||
- @nature
|
||||
- @religion
|
||||
|
||||
wisdom skills
|
||||
- @animal_handling
|
||||
- @insight
|
||||
- @medicine
|
||||
- @perception
|
||||
- @survival
|
||||
|
||||
charisma skills
|
||||
- @deception
|
||||
- @intimidation
|
||||
- @performance
|
||||
- @persuasion
|
||||
|
||||
post derived attributes (Priority 3, grandchild derivatives)
|
||||
|
||||
str skills
|
||||
- @athletics#passive
|
||||
|
||||
dex skills
|
||||
- @acrobatics#passive
|
||||
- @sleight_of_hand#passive
|
||||
- @stealth#passive
|
||||
|
||||
intelligence Skills
|
||||
- @arcana#passive
|
||||
- @history#passive
|
||||
- @investigation#passive
|
||||
- @nature#passive
|
||||
- @religion#passive
|
||||
|
||||
wisdom skills
|
||||
- @animal_handling#passive
|
||||
- @insight#passive
|
||||
- @medicine#passive
|
||||
- @perception#passive
|
||||
- @survival#passive
|
||||
|
||||
charisma skills
|
||||
- @deception#passive
|
||||
- @intimidation#passive
|
||||
- @performance#passive
|
||||
- @persuasion#passive
|
||||
|
||||
|
||||
### Databases
|
||||
|
||||
USERS: this database will store profile info associated with users
|
||||
- user_uuid
|
||||
- username
|
||||
- password
|
||||
- type (later integration with SSOs)
|
||||
- profile picture
|
||||
- flags (later integration for basic settings flags)
|
||||
- user_uuid: Unique user ID (UUID)
|
||||
- username: Username/display name
|
||||
- password: Password (should be securely stored)
|
||||
- type: User type (for future SSO integration)
|
||||
- profile picture: Profile image (e.g. file path or URL)
|
||||
- flags: Settings/status flags (for basic settings; future use)
|
||||
|
||||
|
||||
CHARACTERS: this table will store basic character data but also link the characters to the user_id
|
||||
|
||||
225
my-theme.json
Normal file
225
my-theme.json
Normal file
@ -0,0 +1,225 @@
|
||||
{
|
||||
"$schema": "https://opencode.ai/theme.json",
|
||||
"defs": {
|
||||
"color0": "#1a1b26",
|
||||
"color1": "#f7768e",
|
||||
"color2": "#9ece6a",
|
||||
"color3": "#e0af68",
|
||||
"color4": "#7aa2f7",
|
||||
"color5": "#bb9af7",
|
||||
"color6": "#7dcfff",
|
||||
"color7": "#a9b1d6",
|
||||
"color8": "#414868",
|
||||
"color9": "#f7768e",
|
||||
"color10": "#9ece6a",
|
||||
"color11": "#e0af68",
|
||||
"color12": "#7aa2f7",
|
||||
"color13": "#bb9af7",
|
||||
"color14": "#7dcfff",
|
||||
"color15": "#c0caf5",
|
||||
"background": "#1a1b26",
|
||||
"foreground": "#c0caf5"
|
||||
},
|
||||
"theme": {
|
||||
"primary": {
|
||||
"dark": "color4",
|
||||
"light": "color12"
|
||||
},
|
||||
"secondary": {
|
||||
"dark": "color5",
|
||||
"light": "color13"
|
||||
},
|
||||
"accent": {
|
||||
"dark": "color6",
|
||||
"light": "color6"
|
||||
},
|
||||
"error": {
|
||||
"dark": "color1",
|
||||
"light": "color9"
|
||||
},
|
||||
"warning": {
|
||||
"dark": "color3",
|
||||
"light": "color11"
|
||||
},
|
||||
"success": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"info": {
|
||||
"dark": "color4",
|
||||
"light": "color12"
|
||||
},
|
||||
"text": {
|
||||
"dark": "foreground",
|
||||
"light": "color0"
|
||||
},
|
||||
"textMuted": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"background": {
|
||||
"dark": "background",
|
||||
"light": "color15"
|
||||
},
|
||||
"backgroundPanel": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"backgroundElement": {
|
||||
"dark": "color0",
|
||||
"light": "color15"
|
||||
},
|
||||
"border": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"borderActive": {
|
||||
"dark": "color7",
|
||||
"light": "color8"
|
||||
},
|
||||
"borderSubtle": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"diffAdded": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"diffRemoved": {
|
||||
"dark": "color1",
|
||||
"light": "color9"
|
||||
},
|
||||
"diffContext": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"diffHunkHeader": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"diffHighlightAdded": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"diffHighlightRemoved": {
|
||||
"dark": "color1",
|
||||
"light": "color9"
|
||||
},
|
||||
"diffAddedBg": {
|
||||
"dark": "color0",
|
||||
"light": "color15"
|
||||
},
|
||||
"diffRemovedBg": {
|
||||
"dark": "color0",
|
||||
"light": "color15"
|
||||
},
|
||||
"diffContextBg": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"diffLineNumber": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"diffAddedLineNumberBg": {
|
||||
"dark": "color0",
|
||||
"light": "color15"
|
||||
},
|
||||
"diffRemovedLineNumberBg": {
|
||||
"dark": "color0",
|
||||
"light": "color15"
|
||||
},
|
||||
"markdownText": {
|
||||
"dark": "foreground",
|
||||
"light": "color0"
|
||||
},
|
||||
"markdownHeading": {
|
||||
"dark": "color4",
|
||||
"light": "color12"
|
||||
},
|
||||
"markdownLink": {
|
||||
"dark": "color6",
|
||||
"light": "color14"
|
||||
},
|
||||
"markdownLinkText": {
|
||||
"dark": "color4",
|
||||
"light": "color12"
|
||||
},
|
||||
"markdownCode": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"markdownBlockQuote": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"markdownEmph": {
|
||||
"dark": "color3",
|
||||
"light": "color11"
|
||||
},
|
||||
"markdownStrong": {
|
||||
"dark": "color5",
|
||||
"light": "color13"
|
||||
},
|
||||
"markdownHorizontalRule": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"markdownListItem": {
|
||||
"dark": "color6",
|
||||
"light": "color14"
|
||||
},
|
||||
"markdownListEnumeration": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"markdownImage": {
|
||||
"dark": "color6",
|
||||
"light": "color14"
|
||||
},
|
||||
"markdownImageText": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"markdownCodeBlock": {
|
||||
"dark": "color0",
|
||||
"light": "color15"
|
||||
},
|
||||
"syntaxComment": {
|
||||
"dark": "color8",
|
||||
"light": "color7"
|
||||
},
|
||||
"syntaxKeyword": {
|
||||
"dark": "color4",
|
||||
"light": "color12"
|
||||
},
|
||||
"syntaxFunction": {
|
||||
"dark": "color6",
|
||||
"light": "color14"
|
||||
},
|
||||
"syntaxVariable": {
|
||||
"dark": "color5",
|
||||
"light": "color13"
|
||||
},
|
||||
"syntaxString": {
|
||||
"dark": "color2",
|
||||
"light": "color10"
|
||||
},
|
||||
"syntaxNumber": {
|
||||
"dark": "color3",
|
||||
"light": "color11"
|
||||
},
|
||||
"syntaxType": {
|
||||
"dark": "color4",
|
||||
"light": "color12"
|
||||
},
|
||||
"syntaxOperator": {
|
||||
"dark": "color1",
|
||||
"light": "color9"
|
||||
},
|
||||
"syntaxPunctuation": {
|
||||
"dark": "foreground",
|
||||
"light": "color0"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user