6af03ef95e
Introduces a new maintenance mode feature to allow administrators to temporarily disable the application for updates or maintenance. This includes: - A dedicated `MaintenancePage` component. - Global state management for maintenance mode and message in `App.tsx`. - Firestore integration for storing and retrieving maintenance settings. - Updates to `AdminDashboard.tsx` to manage these settings. - Firebase security rules adjustments for the new settings collection. - Animate transitions for signal results in `SignalHistory.tsx`.
88 lines
2.7 KiB
JSON
88 lines
2.7 KiB
JSON
{
|
|
"entities": {
|
|
"User": {
|
|
"title": "User Profile",
|
|
"description": "Represents a user profile with their plan and approval status.",
|
|
"type": "object",
|
|
"properties": {
|
|
"uid": { "type": "string" },
|
|
"email": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"isPremium": { "type": "boolean" },
|
|
"isAdmin": { "type": "boolean" },
|
|
"plan": { "type": "string", "enum": ["basic", "pro", "elite"] },
|
|
"analysisLimit": { "type": "integer" },
|
|
"isApproved": { "type": "boolean" }
|
|
},
|
|
"required": ["uid", "email", "name", "plan"]
|
|
},
|
|
"Signal": {
|
|
"title": "Trading Signal",
|
|
"description": "Technical analysis signal generated by the AI.",
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": { "type": "string" },
|
|
"pair": { "type": "string" },
|
|
"timeframe": { "type": "string" },
|
|
"decision": { "type": "string" },
|
|
"score": { "type": "integer" },
|
|
"entry": { "type": "string" },
|
|
"stopLoss": { "type": "string" },
|
|
"takeProfit": { "type": "string" },
|
|
"justification": { "type": "string" },
|
|
"conceptsDetected": { "type": "array", "items": { "type": "string" } },
|
|
"screenshotUrl": { "type": "string" },
|
|
"timestamp": { "type": "integer" },
|
|
"createdAt": { "type": "object" },
|
|
"result": { "type": "string" }
|
|
},
|
|
"required": ["userId", "pair", "decision", "timestamp"]
|
|
},
|
|
"Testimonial": {
|
|
"title": "User Testimonial",
|
|
"description": "Public review left by a user.",
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": { "type": "string" },
|
|
"userName": { "type": "string" },
|
|
"text": { "type": "string" },
|
|
"timestamp": { "type": "integer" },
|
|
"imageUrls": {
|
|
"type": "array",
|
|
"items": { "type": "string" }
|
|
}
|
|
},
|
|
"required": ["userId", "userName", "text", "timestamp"]
|
|
},
|
|
"AppSettings": {
|
|
"title": "App Settings",
|
|
"description": "Global application settings.",
|
|
"type": "object",
|
|
"properties": {
|
|
"maintenanceMode": { "type": "boolean" },
|
|
"maintenanceMessage": { "type": "string" }
|
|
},
|
|
"required": ["maintenanceMode"]
|
|
}
|
|
},
|
|
"firestore": {
|
|
"users/{userId}": {
|
|
"schema": "User",
|
|
"description": "User profiles by UID."
|
|
},
|
|
"signals/{signalId}": {
|
|
"schema": "Signal",
|
|
"description": "Generated signals."
|
|
},
|
|
"testimonials/{testimonialId}": {
|
|
"schema": "Testimonial",
|
|
"description": "Public user testimonials."
|
|
},
|
|
"settings/{settingId}": {
|
|
"schema": "AppSettings",
|
|
"description": "Global application settings."
|
|
}
|
|
}
|
|
}
|
|
|