docs: add project documentation and initial specs
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# Admin Feature Spec
|
||||
|
||||
## Current Implementation
|
||||
|
||||
### Access model
|
||||
|
||||
- Middleware can protect admin routes with Basic Auth
|
||||
- App login requires configured password and signed cookie session
|
||||
- Failed password attempts trigger lockout
|
||||
|
||||
### Routing
|
||||
|
||||
- Source pages live in
|
||||
|
||||
`app/_admin`
|
||||
|
||||
- Middleware rewrites to
|
||||
|
||||
`app/admin-internal`
|
||||
|
||||
- Development compatibility routes exist under
|
||||
|
||||
`app/root`
|
||||
|
||||
### Capabilities
|
||||
|
||||
- Overview dashboard
|
||||
- Maintenance mode
|
||||
- Media Library
|
||||
- Site Settings
|
||||
- Marquee Settings
|
||||
- SMTP Settings
|
||||
- Contact Protection
|
||||
- Portfolio categories
|
||||
- Portfolio projects
|
||||
- UI Kit page
|
||||
|
||||
## Constraints
|
||||
|
||||
- Admin currently assumes a single shared operator credential model
|
||||
- No role-based access control exists
|
||||
- No audit log exists
|
||||
|
||||
## Recommended Improvements
|
||||
|
||||
- Add per-user authentication if multiple operators are expected
|
||||
- Add action audit logging for content and configuration changes
|
||||
- Add tests around middleware rewriting and auth edge cases
|
||||
@@ -0,0 +1,59 @@
|
||||
# Contact Feature Spec
|
||||
|
||||
## Current Implementation
|
||||
|
||||
### Public flow
|
||||
|
||||
- Public contact page exists at
|
||||
|
||||
`/contact`
|
||||
|
||||
- Form fields:
|
||||
- name
|
||||
- email
|
||||
- phone
|
||||
- company
|
||||
- message
|
||||
- Submission uses a server action
|
||||
- Success redirects to
|
||||
|
||||
`/success`
|
||||
|
||||
### Protection
|
||||
|
||||
- Validation uses
|
||||
|
||||
`zod`
|
||||
|
||||
- Optional Cloudflare Turnstile verification
|
||||
- Optional rate limiting by IP window
|
||||
|
||||
### Delivery
|
||||
|
||||
- Messages are sent by SMTP through
|
||||
|
||||
`nodemailer`
|
||||
|
||||
- Recipient configuration comes from admin settings
|
||||
- Messages are not persisted in the database
|
||||
|
||||
### Admin controls
|
||||
|
||||
- SMTP settings page
|
||||
- Test email action
|
||||
- Contact protection settings page
|
||||
|
||||
## Risks
|
||||
|
||||
- Contact history is lost if email delivery succeeds but later needs auditing
|
||||
- Rate-limit counters are stored in
|
||||
|
||||
`AppConfig`
|
||||
|
||||
which mixes operational and business configuration
|
||||
|
||||
## Recommended Improvements
|
||||
|
||||
- Store contact submissions if the business needs pipeline visibility
|
||||
- Add spam and abuse observability
|
||||
- Add structured delivery error reporting
|
||||
@@ -0,0 +1,39 @@
|
||||
# Downloads Feature Spec
|
||||
|
||||
## Current Implementation
|
||||
|
||||
- Portfolio assets support
|
||||
|
||||
`DOCUMENT`
|
||||
|
||||
files
|
||||
- Portfolio detail pages expose document links with an
|
||||
|
||||
`Open document`
|
||||
|
||||
action
|
||||
- Media library can store document assets
|
||||
|
||||
## Gaps
|
||||
|
||||
- No standalone downloads index exists
|
||||
- No download access rules exist
|
||||
- No download analytics or gating exists
|
||||
- No dedicated
|
||||
|
||||
`Download`
|
||||
|
||||
model exists
|
||||
|
||||
## Proposed Scope
|
||||
|
||||
This is a proposed feature, not an implemented one.
|
||||
|
||||
- Central downloads listing
|
||||
- Optional download categories
|
||||
- Optional gated download access
|
||||
- Download tracking
|
||||
|
||||
## Recommended First Step
|
||||
|
||||
- Decide whether downloads remain a portfolio asset type or become their own domain
|
||||
@@ -0,0 +1,29 @@
|
||||
# Orders Feature Spec
|
||||
|
||||
## Current Implementation
|
||||
|
||||
- No
|
||||
|
||||
`Order`
|
||||
|
||||
model exists
|
||||
- No checkout flow exists
|
||||
- No payment integration exists
|
||||
- No admin order management exists
|
||||
|
||||
## Proposed Scope
|
||||
|
||||
This is a proposed feature, not an implemented one.
|
||||
|
||||
- Order creation from products or inquiry conversions
|
||||
- Order status lifecycle
|
||||
- Admin order review and fulfillment tracking
|
||||
- Email notifications for order events
|
||||
|
||||
## Recommended First Step
|
||||
|
||||
- Clarify whether
|
||||
|
||||
`orders`
|
||||
|
||||
means ecommerce checkout, service bookings, or manual sales records
|
||||
@@ -0,0 +1,40 @@
|
||||
# Products Feature Spec
|
||||
|
||||
## Current Implementation
|
||||
|
||||
- No
|
||||
|
||||
`Product`
|
||||
|
||||
model exists
|
||||
- No public
|
||||
|
||||
`/products`
|
||||
|
||||
route exists
|
||||
- No admin CRUD exists for products
|
||||
- The site header contains a disabled
|
||||
|
||||
`Products`
|
||||
|
||||
navigation item marked as
|
||||
|
||||
`Soon`
|
||||
|
||||
## Proposed Scope
|
||||
|
||||
This is a proposed feature, not an implemented one.
|
||||
|
||||
- Public product listing page
|
||||
- Product detail page
|
||||
- Product media and downloadable assets
|
||||
- Admin product CRUD
|
||||
- Optional relation from products to portfolio case studies
|
||||
|
||||
## Recommended First Step
|
||||
|
||||
- Define a dedicated
|
||||
|
||||
`Product`
|
||||
|
||||
data model before any UI work
|
||||
@@ -0,0 +1,32 @@
|
||||
# Project Inquiry Feature Spec
|
||||
|
||||
## Current Implementation
|
||||
|
||||
- No separate
|
||||
|
||||
`ProjectInquiry`
|
||||
|
||||
model exists
|
||||
- No dedicated project inquiry route exists
|
||||
- Current CTAs route users to the generic contact form
|
||||
|
||||
## Proposed Scope
|
||||
|
||||
This is a proposed feature, not an implemented one.
|
||||
|
||||
- Inquiry form specifically for new project leads
|
||||
- Optional prefilled source context from portfolio or homepage CTA
|
||||
- Inquiry status tracking in admin
|
||||
- Possible conversion into
|
||||
|
||||
`Order`
|
||||
|
||||
or CRM lead later
|
||||
|
||||
## Recommended First Step
|
||||
|
||||
- Decide whether project inquiry should stay a specialized
|
||||
|
||||
`contact`
|
||||
|
||||
variant or become a persisted lead-management feature
|
||||
@@ -0,0 +1,68 @@
|
||||
# Projects Feature Spec
|
||||
|
||||
## Scope
|
||||
|
||||
This spec documents the currently implemented
|
||||
|
||||
`portfolio projects`
|
||||
|
||||
domain.
|
||||
|
||||
## Current Implementation
|
||||
|
||||
### User-facing
|
||||
|
||||
- Users can browse published projects on
|
||||
|
||||
`/portfolio`
|
||||
|
||||
- Users can filter by category
|
||||
- Users can open a project detail page by slug
|
||||
- Project detail can render rich sections, galleries, stats, deliverables, and links
|
||||
- Document assets can be opened from project detail pages
|
||||
|
||||
### Admin-facing
|
||||
|
||||
- Admin can create, edit, publish, unpublish, and delete projects
|
||||
- Admin can assign one category per project
|
||||
- Admin can manage:
|
||||
- localized titles and summaries
|
||||
- client name
|
||||
- project year
|
||||
- service label
|
||||
- preview URL
|
||||
- cover image
|
||||
- sections
|
||||
- assets
|
||||
- featured flag
|
||||
- published flag
|
||||
- sort order
|
||||
- view mode
|
||||
|
||||
### Data model
|
||||
|
||||
- `PortfolioProject`
|
||||
- `PortfolioSection`
|
||||
- `PortfolioAsset`
|
||||
- `Category`
|
||||
|
||||
## Constraints
|
||||
|
||||
- Only published projects appear publicly
|
||||
- Category delete is blocked if projects exist
|
||||
- Each project must have exactly one category
|
||||
- View mode is limited to existing enum values
|
||||
|
||||
## Recommended Improvements
|
||||
|
||||
- Rename this feature from
|
||||
|
||||
`portfolio`
|
||||
|
||||
to
|
||||
|
||||
`projects`
|
||||
|
||||
only if the business wants portfolio and project management to be the same domain
|
||||
- Add preview workflow instead of relying only on publish state
|
||||
- Add revision history for content changes
|
||||
Reference in New Issue
Block a user