83 lines
2.4 KiB
Markdown
83 lines
2.4 KiB
Markdown
Architecture
|
|
===
|
|
|
|
This document outlines the high-level architecture and design for the project.
|
|
|
|
## Technology Stack
|
|
|
|
<!--
|
|
Technology Stack Example
|
|
===
|
|
|
|
- **Ruby**: Primarily used for backend development.
|
|
- **Ruby on Rails**: Web application framework for building the backend services.
|
|
- **PostgreSQL**: Relational database for data storage.
|
|
- **StimulusJS**: JavaScript framework for enhancing frontend interactivity.
|
|
- **Amazon Web Services (AWS)**: Cloud platform for hosting and deploying the application.
|
|
- **RDS**: Managed relational database service provided by AWS.
|
|
|
|
Replace the above with actual technologies and versions used in your project.
|
|
-->
|
|
|
|
- [STACK_NAME]: [REQUIREMENT_DESCRIPTION]
|
|
- [STACK_NAME]: [REQUIREMENT_DESCRIPTION]
|
|
|
|
## Structure
|
|
|
|
<!--
|
|
Replace the example structure below with the actual directory structure of your project.
|
|
-->
|
|
|
|
```
|
|
|- app/
|
|
|- controllers/ # Controllers for handling requests
|
|
|- models/ # Data models
|
|
|- views/ # View templates
|
|
|- lib/ # Application-specific libraries
|
|
|- domains/ # Domain-specific logic
|
|
|- [DOMAIN_NAME]/ # Replace with actual domain names
|
|
|- services/ # Domain services
|
|
|- repositories/ # Data access layer
|
|
|- config/ # Configuration files
|
|
|- routes.rb # Application routes
|
|
```
|
|
|
|
## [PATTERN_NAME]
|
|
|
|
[PATTERN_EXPLANATION]
|
|
|
|
<!--
|
|
Add more sections related to architecture patterns, design decisions, and rationale as needed.
|
|
|
|
Pattern Example
|
|
===
|
|
|
|
## Service-Oriented Architecture (SOA)
|
|
|
|
This project follows a Service-Oriented Architecture (SOA) pattern to promote modularity and scalability. Each domain is encapsulated within its own service, allowing for independent development and deployment.
|
|
|
|
```ruby
|
|
# path: lib/domains/notification/services/send_email_service.rb
|
|
module Domains
|
|
module Notification
|
|
module Services
|
|
class SendEmailService
|
|
def initialize(user, message)
|
|
@user = user
|
|
@message = message
|
|
end
|
|
|
|
def call
|
|
# Logic to send email
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
```
|
|
|
|
- Use `#call` method to execute the service.
|
|
- Naming convention: `[Action]Service` for service classes.
|
|
- Place services under `lib/domains/[DOMAIN_NAME]/services/`.
|
|
-->
|