feat: Add GlowTrack mood and habit wellbeing grid specifications
- Introduced export schema for JSON data structure. - Created renderer contract detailing canvas/SVG rendering requirements. - Defined IndexedDB storage schema and migration strategies. - Documented data model including entities and relationships. - Developed implementation plan outlining execution flow and project structure. - Provided quickstart guide for development environment setup. - Compiled research documentation on performance, accessibility, and theming. - Established feature specification with user scenarios and functional requirements.
This commit is contained in:
75
specs/001-glowtrack-a-mood/contracts/export.schema.json
Normal file
75
specs/001-glowtrack-a-mood/contracts/export.schema.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://glowtrack.app/schema/export.json",
|
||||
"title": "GlowTrack Export",
|
||||
"type": "object",
|
||||
"required": ["version", "app", "exportedAt", "data"],
|
||||
"properties": {
|
||||
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
||||
"app": {
|
||||
"type": "object",
|
||||
"required": ["name", "version"],
|
||||
"properties": {
|
||||
"name": { "const": "GlowTrack" },
|
||||
"version": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"exportedAt": { "type": "string", "format": "date-time" },
|
||||
"data": {
|
||||
"type": "object",
|
||||
"required": ["settings", "habits", "days"],
|
||||
"properties": {
|
||||
"settings": { "type": "object" },
|
||||
"habits": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "type", "label", "defaultWeight", "archived"],
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"type": { "enum": ["positive", "negative"] },
|
||||
"label": { "type": "string" },
|
||||
"icon": { "type": ["string", "null"] },
|
||||
"defaultWeight": { "type": "number", "minimum": 0 },
|
||||
"archived": { "type": "boolean" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"days": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["date", "mood", "entries"],
|
||||
"properties": {
|
||||
"date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
||||
"mood": {
|
||||
"type": "object",
|
||||
"required": ["hue", "intensity"],
|
||||
"properties": {
|
||||
"hue": { "type": "number", "minimum": 0, "maximum": 360 },
|
||||
"intensity": { "type": "number", "minimum": 0, "maximum": 1 },
|
||||
"note": { "type": ["string", "null"] }
|
||||
}
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "type", "habitId", "label", "weight", "timestamp"],
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"type": { "enum": ["positive", "negative"] },
|
||||
"habitId": { "type": "string" },
|
||||
"label": { "type": "string" },
|
||||
"weight": { "type": "number", "minimum": 0 },
|
||||
"timestamp": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user