smdev 1.1.1 β†’ 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smdev/cursor_rules/backup_manager.rb +103 -0
  3. data/lib/smdev/cursor_rules/config_manager.rb +60 -0
  4. data/lib/smdev/cursor_rules/directory_manager.rb +55 -0
  5. data/lib/smdev/cursor_rules/file_copier.rb +53 -0
  6. data/lib/smdev/cursor_rules/file_operations.rb +83 -0
  7. data/lib/smdev/cursor_rules/installer.rb +128 -0
  8. data/lib/smdev/cursor_rules/templates/.cursor/rules/core-rules/readme.md +1 -0
  9. data/lib/smdev/cursor_rules/templates/.cursor/rules/core-rules/rule-generating-agent.mdc +86 -0
  10. data/lib/smdev/cursor_rules/templates/.cursor/rules/default.mdc +42 -0
  11. data/lib/smdev/cursor_rules/templates/.cursor/rules/documentation/markdown-auto.mdc +59 -0
  12. data/lib/smdev/cursor_rules/templates/.cursor/rules/documentation/readme.md +1 -0
  13. data/lib/smdev/cursor_rules/templates/.cursor/rules/global-rules/emoji-communication-always.mdc +33 -0
  14. data/lib/smdev/cursor_rules/templates/.cursor/rules/global-rules/performance-standards-agent.mdc +36 -0
  15. data/lib/smdev/cursor_rules/templates/.cursor/rules/global-rules/readme.md +5 -0
  16. data/lib/smdev/cursor_rules/templates/.cursor/rules/global-rules/tech-stack-agent.mdc +42 -0
  17. data/lib/smdev/cursor_rules/templates/.cursor/rules/rb-rules/database-standards-agent.mdc +52 -0
  18. data/lib/smdev/cursor_rules/templates/.cursor/rules/rb-rules/rails-conventions-agent.mdc +48 -0
  19. data/lib/smdev/cursor_rules/templates/.cursor/rules/rb-rules/readme.md +1 -0
  20. data/lib/smdev/cursor_rules/templates/.cursor/rules/testing-rules/rspec-standards-agent.mdc +51 -0
  21. data/lib/smdev/cursor_rules/templates/.cursor/rules/tool-rules/gitpush.mdc +35 -0
  22. data/lib/smdev/cursor_rules/templates/.cursor/rules/tool-rules/readme.md +1 -0
  23. data/lib/smdev/cursor_rules/templates/.cursor/rules/ts-rules/readme.md +1 -0
  24. data/lib/smdev/cursor_rules/templates/.cursor/rules/ui-rules/readme.md +11 -0
  25. data/lib/smdev/cursor_rules/templates/.cursor/rules/ui-rules/ui-component-standards-agent.mdc +55 -0
  26. data/lib/smdev/cursor_rules/templates/.cursor/rules/workflows/workflow-agile-manual.mdc +48 -0
  27. data/lib/smdev/cursor_rules/templates/.cursor/templates/template-arch.md +76 -0
  28. data/lib/smdev/cursor_rules/templates/.cursor/templates/template-prd.md +136 -0
  29. data/lib/smdev/cursor_rules/templates/.cursor/templates/template-story.md +146 -0
  30. data/lib/smdev/cursor_rules/templates/docs/agile-readme.md +251 -0
  31. data/lib/smdev/cursor_rules/templates/docs/cursor_rules.md +88 -0
  32. data/lib/smdev/cursor_rules/user_interface.rb +27 -0
  33. data/lib/smdev/cursor_rules.rb +16 -0
  34. data/lib/smdev/ecs_exec.rb +0 -4
  35. data/lib/smdev.rb +86 -105
  36. metadata +34 -2
@@ -0,0 +1,33 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Emoji Communication Guidelines
8
+
9
+ ## Critical Rules
10
+
11
+ - Use emojis purposefully to enhance meaning, but feel free to be creative and fun
12
+ - Place emojis at the end of statements or sections
13
+ - Maintain professional tone while surprising users with clever choices
14
+ - Limit emoji usage to 1-2 per major section
15
+ - Choose emojis that are both fun and contextually appropriate
16
+ - Place emojis at the end of statements, not at the beginning or middle
17
+ - Don't be afraid to tell a mini-story with your emoji choice
18
+
19
+ ## Examples
20
+
21
+ <example>
22
+ "I've optimized your database queries πŸƒβ€β™‚οΈ"
23
+ "Your bug has been squashed πŸ₯ΎπŸ›"
24
+ "I've cleaned up the legacy code 🧹✨"
25
+ "Fixed the performance issue πŸŒβž‘οΈπŸ†"
26
+ </example>
27
+
28
+ <example type="invalid">
29
+ "Multiple πŸŽ‰ emojis 🎊 in 🌟 one message"
30
+ "Using irrelevant emojis πŸ₯‘"
31
+ "Placing the emoji in the middle ⭐️ of a sentence"
32
+ "Great Job!!!" - lack of obvious use of an emoji
33
+ </example>
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Apply when writing or modifying code that could impact system performance
3
+ globs: *.rb, *.erb.html
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Performance Standards
8
+
9
+ ## Context
10
+ - Ensures application performance and scalability
11
+ - Prevents common performance issues
12
+ - Guides optimization decisions
13
+
14
+ ## Critical Rules
15
+ - Optimize database queries
16
+ - Implement appropriate caching
17
+ - Use background jobs for heavy tasks
18
+ - Add necessary database indexes
19
+ - Monitor and fix N+1 queries
20
+ - Use bulk operations when possible
21
+
22
+ ## Examples
23
+
24
+ <example>
25
+ - Using includes to prevent N+1 queries
26
+ - Using bulk_insert for multiple records
27
+ - Implementing fragment caching for views
28
+ - Moving heavy processing to Sidekiq jobs
29
+ </example>
30
+
31
+ <example type="invalid">
32
+ - Loading associations without includes
33
+ - Creating records in loops
34
+ - Processing large datasets in web requests
35
+ - Not using indexes on frequently queried columns
36
+ </example>
@@ -0,0 +1,5 @@
1
+ All globally applying always on rules that will bloat every chat and cmd-k context go here.
2
+
3
+ Rules in this folder will have alwaysApply: true with blank descriptions and globs.
4
+
5
+ These are equivalent to the root project .cursorrules files (which are now deprecated and may be removed in a future cursor version)
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Information about the project's technology stack and core dependencies
3
+ globs:
4
+ alwaysApply: true
5
+ ---
6
+
7
+ # Project Technology Stack
8
+
9
+ ## Context
10
+ - Defines the core technologies and external services used in the project
11
+ - Reference for making technology decisions
12
+ - Guide for maintaining consistency across the project
13
+
14
+ ## Critical Rules
15
+ - Use Ruby on Rails as the web framework
16
+ - Use zsh for shell
17
+ - Target Apple Silicon for dependencies
18
+ - Use Homebrew for package management
19
+ - Use Bundler for dependency management
20
+ - Implement Hotwire Turbo/Stimulus for frontend interactivity
21
+ - Style with Backpack UI and TailwindCSS
22
+ - Use Font Awesome for icons
23
+ - Use PostgreSQL for database
24
+ - Implement Sidekiq + Redis for background jobs
25
+ - Integrate with:
26
+ - Stripe for payments
27
+ - Algolia for search
28
+ - StrongMind Identity for SSO
29
+
30
+ ## Examples
31
+
32
+ <example>
33
+ - Using Turbo Frames for dynamic content loading
34
+ - Use Rails generators for new migrations
35
+ - Implementing Stimulus controllers for interactive components
36
+ - Using Sidekiq workers for background processing
37
+ </example>
38
+
39
+ <example type="invalid">
40
+ - Using Powershell for shell
41
+
42
+ </example>
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Apply when working with database-related code to ensure proper structure and performance
3
+ globs: db/migrate/*.rb, app/models/*.rb
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Database Standards
8
+
9
+ ## Context
10
+ - Ensures consistent database design
11
+ - Maintains data integrity
12
+ - Optimizes performance
13
+
14
+ ## Critical Rules
15
+ - Include foreign key constraints
16
+ - Add appropriate indexes
17
+ - Use references for associations
18
+ - Follow standard model structure:
19
+ 1. Constants
20
+ 2. Associations
21
+ 3. Validations
22
+ 4. Scopes
23
+ 5. Class methods
24
+ 6. Instance methods
25
+
26
+ ## Examples
27
+
28
+ <example>
29
+ class User < ApplicationRecord
30
+ ROLES = %w[admin moderator user].freeze
31
+
32
+ belongs_to :organization
33
+ has_many :posts, dependent: :destroy
34
+
35
+ validates :name, presence: true
36
+
37
+ scope :active, -> { where(status: 'active') }
38
+ end
39
+ </example>
40
+
41
+ <example type="invalid">
42
+ class User < ApplicationRecord
43
+ def full_name
44
+ "#{first_name} #{last_name}"
45
+ end
46
+
47
+ ROLES = %w[admin moderator user].freeze
48
+
49
+ validates :name, presence: true
50
+ belongs_to :organization
51
+ end
52
+ </example>
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Apply when working with Ruby/Rails files to ensure consistent patterns and practices
3
+ globs: *.rb, *.rake
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Rails Development Standards
8
+
9
+ ## Context
10
+ - Ensures consistent Ruby/Rails development practices
11
+ - Maintains code quality and readability
12
+ - Guides architectural decisions
13
+
14
+ ## Critical Rules
15
+ - Follow current Rails version conventions
16
+ - Use Rails generators for database changes
17
+ - Use Ruby 3.x syntax
18
+ - Use string interpolation over concatenation
19
+ - Use double quotes only for interpolation
20
+ - Follow "skinny controller, fat model" pattern
21
+ - Use concerns for shared functionality
22
+ - Use service objects for complex business logic
23
+ - Prefer server-side solutions using Turbo over client-side JS
24
+
25
+ ## Examples
26
+
27
+ <example>
28
+ # Good Implementation
29
+ name = "World"
30
+ message = "Hello #{name}"
31
+
32
+ class UserService
33
+ def self.create_with_profile(params)
34
+ # Complex business logic here
35
+ end
36
+ end
37
+ </example>
38
+
39
+ <example type="invalid">
40
+ name = "World"
41
+ message = "Hello " + name
42
+
43
+ class UsersController
44
+ def create
45
+ # Complex business logic in controller
46
+ end
47
+ end
48
+ </example>
@@ -0,0 +1 @@
1
+ Ruby on Rails Specific Rules belong in this folder
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Apply when writing or modifying test files to ensure consistent testing practices
3
+ globs: spec/**/*.rb
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Testing Standards
8
+
9
+ ## Context
10
+ - Ensures consistent testing practices
11
+ - Maintains test quality and readability
12
+ - Guides test structure and organization
13
+
14
+ ## Critical Rules
15
+ - Use RSpec for testing
16
+ - Use FactoryBot for test data
17
+ - Write descriptive test cases
18
+ - Test both happy and sad paths
19
+ - Don't mock attributes of the testing subject
20
+ - Ignore spec type in descriptions
21
+ - Ignore 'require rails_helper'
22
+
23
+ ## Examples
24
+
25
+ <example>
26
+ RSpec.describe User do
27
+ describe 'validations' do
28
+ it { should validate_presence_of(:name) }
29
+ end
30
+
31
+ describe '#full_name' do
32
+ it 'returns the combined first and last name' do
33
+ user = create(:user, first_name: 'John', last_name: 'Doe')
34
+ expect(user.full_name).to eq('John Doe')
35
+ end
36
+ end
37
+ end
38
+ </example>
39
+
40
+ <example type="invalid">
41
+ require 'rails_helper'
42
+
43
+ RSpec.describe User, type: :model do
44
+ describe 'User#full_name' do
45
+ it 'works' do
46
+ user = User.new(first_name: 'John', last_name: 'Doe')
47
+ expect(user.full_name).to eq('John Doe')
48
+ end
49
+ end
50
+ end
51
+ </example>
@@ -0,0 +1,35 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Git Push Manual Rule
8
+
9
+ ## Context
10
+
11
+ Used when user indicates they want to update all saved changes in git
12
+
13
+ ## Critical Rules
14
+
15
+ - Run the command `git add .` from the root of the workspace
16
+ - Review all added changes that will be included in the commit
17
+ - Use format for title: `type: brief description` - keep it brief and descriptive (max 72 chars)
18
+ - Add two line breaks after commit title
19
+ - Include short paragraph summary of gist of what and why the change is being made and end with " -Agent Generated Commit Message"
20
+ - Push all to the remote current branch
21
+
22
+ ## Examples
23
+
24
+ <example>
25
+ doc: explain recent rules changes in cursor
26
+
27
+ Updated the readme to include a better diagram showing rules workflow, while
28
+ also adding more sample rules to show rule folder organization. Specifically, notice that the change to `.cursor/rules/*folders` include readme.md files also to aid in understanding the folders purpose for human developers. AI gets its understanding from `.cursor/rules/rule-generating-agent.mdc` instead.
29
+
30
+ -Agent Generated Commit Message
31
+ </example>
32
+
33
+ <example type="invalid">
34
+ fixed stuff
35
+ </example>
@@ -0,0 +1 @@
1
+ Rules specific to different tools, such as git, linux commands, direction of usage of MCP tools.
@@ -0,0 +1 @@
1
+ TypeScript Specific Rules belong in this folder
@@ -0,0 +1,11 @@
1
+ # UI Rules Directory
2
+
3
+ This directory contains rules related to frontend development and user interface design, including:
4
+
5
+ - Rails Views
6
+ - HTML structure and semantics
7
+ - CSS and styling guidelines
8
+ - View Components (if applicable)
9
+ - General frontend development practices
10
+
11
+ Each rule in this directory should focus on specific UI/UX concerns and follow the standard .mdc file format. Rules should be stored in individual .mdc files with appropriate naming conventions (e.g., *-agent.mdc, *-auto.mdc, *-always.mdc).
@@ -0,0 +1,55 @@
1
+ ---
2
+ description: Apply when creating or modifying any UI components to ensure consistent styling and UX patterns
3
+ globs: *.erb.html, *.css, *.scss, *.less
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # StrongMind UI Component Standards
8
+
9
+ ## Context
10
+
11
+ - Ensures consistent UI/UX across StrongMind applications
12
+ - Maintains design system compliance
13
+ - Promotes maintainable styling patterns
14
+
15
+ ## Critical Rules
16
+
17
+ - Check "@BackPack UI" FIRST before creating custom components
18
+ - Use StrongMind UX library components with their default styling when available
19
+ - Implement Tailwind utility classes for custom styling needs
20
+ - Group related Tailwind classes using consistent ordering:
21
+ 1. Layout (flex, grid, position)
22
+ 2. Spacing (margin, padding)
23
+ 3. Sizing (width, height)
24
+ 4. Typography
25
+ 5. Colors and visual effects
26
+ - Use semantic HTML elements as base components when possible
27
+
28
+ ## Examples
29
+
30
+ <example>
31
+ // Using StrongMind UX library component
32
+ // Good - Using UX library with Tailwind for custom positioning
33
+ <button
34
+ className="mt-4 ml-auto sm-btn"
35
+ >
36
+ Submit
37
+ </button>
38
+
39
+ // Good - Consistent class ordering
40
+ <div className="flex items-center p-4 w-full text-sm text-gray-700 bg-white">
41
+ {children}
42
+ </div>
43
+ </example>
44
+
45
+ <example type="invalid">
46
+ // Bad - Custom button when UX library provides one
47
+ <button className="px-4 py-2 bg-blue-500 text-white rounded">
48
+ Submit
49
+ </button>
50
+
51
+ // Bad - Inconsistent class ordering
52
+ <div className="text-sm bg-white flex w-full items-center p-4">
53
+ {children}
54
+ </div>
55
+ </example>
@@ -0,0 +1,48 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+ # Agile Workflow and core memory procedure RULES that MUST be followed EXACTLY!
7
+
8
+ <critical-rules>
9
+ - First Ensure a .ai/prd.md file exists, if not, work with the user to create one so you know in full detail what the project is about.
10
+ - This workflow rule is critical to your memory systems, all retention of what is planned or what has been completed or changed will be recorded in the .ai folder.
11
+ - It is critical that this information be retained in top quality and kept up to date.
12
+ - When you are unsure, reference the PRD, ARCH, current and previous stories as needed to guide you. If still unsure, don't ever guess - ask the user for help.
13
+ </critical-rules>
14
+
15
+ 1. When coming online, you will first check if a .ai/prd.md file exists, if not, work with the user to create one to you know what the project is about.
16
+ 2. If the PRD is not `status: approved`, you will ONLY have the goal of helping improve the .ai/prd.md file as needed and getting it approved by the user to ensure it is the best possible document including the following:
17
+ - Very Detailed Purpose, problems solved, and task sequence.
18
+ - Very Detailed Architecture patterns and key technical decisions, mermaid diagrams to help visualize the architecture.
19
+ - Very Detailed Technologies, setup, and constraints.
20
+ - Unknowns, assumptions, and risks.
21
+ - It must be formatted and include at least everything outlined in the `.cursor/templates/template-prd.md`
22
+ 3. Once the .ai/prd.md file is created and the status is approved, you will generate the architecture document .ai/arch.md draft - which also needs to be approved.
23
+ - The template for this must be used and include all sections from the template at a minimum: `.cursor/templates/template-arch.md`
24
+ 4. Once the `.ai/arch.md` is approved, create the draft of the first story in the .ai folder.
25
+ 5. Always use the `.cursor/templates/template-story.md` file as a template for the story. The story will be named <story-or-task-><N>.story.md added to the .ai folder
26
+ - Example: .ai/story-1.story.md or .ai/task-1.story.md
27
+ 6. You will ALWAYS wait for approval of the story before proceeding to do any coding or work on the story.
28
+ 7. You are a TDD Master, so you will run tests and ensure tests pass before going to the next subtask or story.
29
+ 8. You will update the story file as subtasks are completed.
30
+ 9. Once a Story is complete, you will generate a draft of the next story and wait on approval before proceeding.
31
+
32
+ ### During Development
33
+
34
+ - Update story files as subtasks are completed.
35
+ - If you are unsure of the next step, ask the user for clarification.
36
+ - When prompted by the user with 'update story', update the current story to:
37
+ - Reflect the current state.
38
+ - Clarify next steps.
39
+ - Ensure the chat log in the story is up to date with any chat thread interactions
40
+ - Continue to verify the story is correct and the next steps are clear.
41
+ - Remember that a story is not complete if you have not also run ALL stories and verified all stories pass. Do not tell the user the story is complete, or mark the story as complete unless you have run ALL the tests.
42
+
43
+ ## YOU DO NOT NEED TO ASK to:
44
+
45
+ 1. Create the story file to be worked on next if none exist.
46
+ 2. Run unit Tests during the development process until they pass.
47
+ 3. Update the story AC and tasks as they are completed.
48
+ 4. Update the story file with the chat log or other updates to retain the best possible memory of the story.
@@ -0,0 +1,76 @@
1
+ # Architecture for {PRD Title}
2
+
3
+ Status: { Draft | Approved }
4
+
5
+ ## Technical Summary
6
+
7
+ { Short 1-2 paragraph }
8
+
9
+ ## Technology Table
10
+
11
+ Table listing choices for languages, libraries, infra, etc...
12
+
13
+ <example>
14
+ | Technology | Description |
15
+ | ------------ | ------------------------------------------------------------- |
16
+ | Kubernetes | Container orchestration platform for microservices deployment |
17
+ | Apache Kafka | Event streaming platform for real-time data ingestion |
18
+ | TimescaleDB | Time-series database for sensor data storage |
19
+ | Go | Primary language for data processing services |
20
+ | GoRilla Mux | REST API Framework |
21
+ | Python | Used for data analysis and ML services |
22
+ </example>
23
+
24
+ ## Architectural Diagrams
25
+
26
+ { Mermaid Diagrams to describe key flows interactions or architecture to be followed during implementation, infra provisioning, and deployments }
27
+
28
+ ## Data Models, API Specs, Schemas, etc...
29
+
30
+ { As needed - may not be exhaustive - but key ideas that need to be retained and followed into the architecture and stories }
31
+
32
+ <example>
33
+ ### Sensor Reading Schema
34
+
35
+ ```json
36
+ {
37
+ "sensor_id": "string",
38
+ "timestamp": "datetime",
39
+ "readings": {
40
+ "temperature": "float",
41
+ "pressure": "float",
42
+ "humidity": "float"
43
+ },
44
+ "metadata": {
45
+ "location": "string",
46
+ "calibration_date": "datetime"
47
+ }
48
+ }
49
+ ```
50
+
51
+ </example>
52
+
53
+ ## Project Structure
54
+
55
+ { Diagram the folder and file organization structure along with descriptions }
56
+
57
+ ```
58
+ β”œ /src
59
+ β”œβ”€β”€ /services
60
+ β”‚ β”œβ”€β”€ /gateway # Sensor data ingestion
61
+ β”‚ β”œβ”€β”€ /processor # Data processing and validation
62
+ β”‚ β”œβ”€β”€ /analytics # Data analysis and ML
63
+ β”‚ └── /notifier # Alert and notification system
64
+ β”œβ”€β”€ /deploy
65
+ β”‚ β”œβ”€β”€ /kubernetes # K8s manifests
66
+ β”‚ └── /terraform # Infrastructure as Code
67
+ └── /docs
68
+ β”œβ”€β”€ /api # API documentation
69
+ └── /schemas # Data schemas
70
+ ```
71
+
72
+ ## Infrastructure
73
+
74
+ ## Deployment Plan
75
+
76
+ ## Change Log
@@ -0,0 +1,136 @@
1
+ # 1. Title: {PRD for {project}}
2
+
3
+ <version>1.0.0</version>
4
+
5
+ ## Status: { Draft | Approved }
6
+
7
+ ## Intro
8
+
9
+ { Short 1-2 paragraph describing the what and why of what the prd will achieve}
10
+
11
+ ## Goals
12
+
13
+ {
14
+
15
+ - Clear project objectives
16
+ - Measurable outcomes
17
+ - Success criteria
18
+ - Key performance indicators (KPIs)
19
+ }
20
+
21
+ ## Features and Requirements
22
+
23
+ {
24
+
25
+ - Functional requirements
26
+ - Non-functional requirements
27
+ - User experience requirements
28
+ - Integration requirements
29
+ - Compliance requirements
30
+ }
31
+
32
+ ## Epic List
33
+
34
+ ### Epic-1: Current PRD Epic (for example backend epic)
35
+
36
+ ### Epic-2: Second Current PRD Epic (for example front end epic)
37
+
38
+ ### Epic-N: Future Epic Enhancements (Beyond Scope of current PRD)
39
+
40
+ ## Epic 1: Story List
41
+
42
+ <example>
43
+ - Story 1: NestJS Configuration
44
+ Status: {''|'InProgress'|'Complete'}
45
+ Requirements:
46
+ - Install NestJS CLI Globally
47
+ - Create a new NestJS project with the nestJS cli generator
48
+
49
+ - Story 2: Hacker News Retrieval API Route
50
+ Status: {''|'InProgress'|'Complete'}
51
+ Requirements:
52
+ - Create API Route that returns a list of Hacker News TopPosts, Scrapped Article from the top posts, and a list of comments from the top posts
53
+ - Route post body specifies the number of posts, articles, and comments to return
54
+ - Create a command in package.json that I can use to call the API Route (route configured in env.local)
55
+ </example>
56
+
57
+ ## Technology Stack
58
+
59
+ { Table listing choices for languages, libraries, infra, etc...}
60
+
61
+ <example>
62
+ | Technology | Description |
63
+ | ------------ | ------------------------------------------------------------- |
64
+ | Kubernetes | Container orchestration platform for microservices deployment |
65
+ | Apache Kafka | Event streaming platform for real-time data ingestion |
66
+ | TimescaleDB | Time-series database for sensor data storage |
67
+ | Go | Primary language for data processing services |
68
+ | GoRilla Mux | REST API Framework |
69
+ | Python | Used for data analysis and ML services |
70
+ </example>
71
+
72
+ ## Reference
73
+
74
+ { Mermaid Diagrams for models tables, visual aids as needed, citations and external urls }
75
+
76
+ ## Data Models, API Specs, Schemas, etc...
77
+
78
+ { As needed - may not be exhaustive - but key ideas that need to be retained and followed into the architecture and stories }
79
+
80
+ <example>
81
+ ### Sensor Reading Schema
82
+
83
+ ```json
84
+ {
85
+ "sensor_id": "string",
86
+ "timestamp": "datetime",
87
+ "readings": {
88
+ "temperature": "float",
89
+ "pressure": "float",
90
+ "humidity": "float"
91
+ },
92
+ "metadata": {
93
+ "location": "string",
94
+ "calibration_date": "datetime"
95
+ }
96
+ }
97
+ ```
98
+
99
+ </example>
100
+
101
+ ## Project Structure
102
+
103
+ { Diagram the folder and file organization structure along with descriptions }
104
+
105
+ <example>
106
+
107
+ ````
108
+ // Start of Selection
109
+ ```text
110
+ src/
111
+ β”œβ”€β”€ services/
112
+ β”‚ β”œβ”€β”€ gateway/ # Sensor data ingestion
113
+ β”‚ β”œβ”€β”€ processor/ # Data processing and validation
114
+ β”‚ β”œβ”€β”€ analytics/ # Data analysis and ML
115
+ β”‚ └── notifier/ # Alert and notification system
116
+ β”œβ”€β”€ deploy/
117
+ β”‚ β”œβ”€β”€ kubernetes/ # K8s manifests
118
+ β”‚ └── terraform/ # Infrastructure as Code
119
+ └── docs/
120
+ β”œβ”€β”€ api/ # API documentation
121
+ └── schemas/ # Data schemas
122
+ ````
123
+
124
+ </example>
125
+
126
+ ## Change Log
127
+
128
+ { Markdown table of key changes after document is no longer in draft and is updated, table includes the change title, the story id that the change happened during, and a description if the title is not clear enough }
129
+
130
+ <example>
131
+ | Change | Story ID | Description |
132
+ | -------------------- | -------- | ------------------------------------------------------------- |
133
+ | Initial draft | N/A | Initial draft prd |
134
+ | Add ML Pipeline | story-4 | Integration of machine learning prediction service story |
135
+ | Kafka Upgrade | story-6 | Upgraded from Kafka 2.0 to Kafka 3.0 for improved performance |
136
+ </example>