|
1 | 1 | const String clientType = String.fromEnvironment('client_type'); |
2 | 2 |
|
| 3 | +/// The unique identifier for the Codelessly Firebase app instance. |
3 | 4 | const String kCodelesslyFirebaseApp = 'codelessly'; |
4 | 5 |
|
5 | | -const String defaultFirebaseProjectId = String.fromEnvironment( |
6 | | - 'firebase_project_id', |
7 | | - defaultValue: prodFirebaseProjectId, |
8 | | -); |
9 | | - |
10 | | -const String defaultFirebaseCloudFunctionsBaseURL = String.fromEnvironment( |
11 | | - 'cloud_functions_base_url', |
12 | | - defaultValue: prodFirebaseCloudFunctionsBaseURL, |
13 | | -); |
14 | | - |
15 | | -const String defaultBaseURL = String.fromEnvironment( |
16 | | - 'base_url', |
17 | | - defaultValue: prodBaseUrl, |
18 | | -); |
19 | | - |
20 | | -const String prodFirebaseProjectId = 'codeless-app'; |
21 | | -const String prodFirebaseCloudFunctionsBaseURL = |
| 6 | +/// Production environment constants |
| 7 | +const String kProdFirebaseProjectId = 'codeless-app'; |
| 8 | +const String kProdCloudFunctionsBaseURL = |
22 | 9 | 'https://us-central1-codeless-app.cloudfunctions.net'; |
23 | | -const String prodBaseUrl = 'https://app.codelessly.com'; |
| 10 | +const String kProdBaseURL = 'https://app.codelessly.com'; |
| 11 | + |
| 12 | +/// Editor identifier constant |
24 | 13 | const String kCodelesslyEditor = 'codelessly_editor'; |
25 | 14 |
|
26 | | -const defaultErrorMessage = |
27 | | - 'We encountered some error while rendering this page! ' |
28 | | - 'We are working on it to fix it as soon as possible.'; |
| 15 | +/// Default error message for rendering failures |
| 16 | +const String defaultErrorMessage = 'Error rendering page.'; |
29 | 17 |
|
| 18 | +/// Cache-related constants |
30 | 19 | const String cacheBoxName = 'cache'; |
31 | 20 | const String cacheFilesBoxName = 'cache_files'; |
32 | 21 | const String authCacheKey = 'auth'; |
33 | 22 |
|
| 23 | +/// Model cache keys |
34 | 24 | const String publishModelCacheKey = 'publish_layout_model'; |
35 | 25 | const String previewModelCacheKey = 'preview_layout_model'; |
36 | 26 | const String templateModelCacheKey = 'template_layout_model'; |
37 | 27 |
|
| 28 | +/// Font cache keys |
38 | 29 | const String publishFontsCacheKey = 'publish_fonts'; |
39 | 30 | const String previewFontsCacheKey = 'preview_fonts'; |
40 | 31 | const String templateFontsCacheKey = 'template_fonts'; |
41 | 32 |
|
| 33 | +/// API cache keys |
42 | 34 | const String publishApisCacheKey = 'publish_apis'; |
43 | 35 | const String previewApisCacheKey = 'preview_apis'; |
44 | 36 | const String templateApisCacheKey = 'template_apis'; |
45 | 37 |
|
| 38 | +/// Variable cache keys |
46 | 39 | const String publishVariablesCacheKey = 'publish_variables'; |
47 | 40 | const String previewVariablesCacheKey = 'preview_variables'; |
48 | 41 | const String templateVariablesCacheKey = 'template_variables'; |
49 | 42 |
|
| 43 | +/// Condition cache keys |
50 | 44 | const String publishConditionsCacheKey = 'publish_conditions'; |
51 | 45 | const String previewConditionsCacheKey = 'preview_conditions'; |
52 | 46 | const String templateConditionsCacheKey = 'template_conditions'; |
53 | 47 |
|
| 48 | +/// Path constants |
54 | 49 | const String publishPath = 'publish'; |
55 | 50 | const String previewPath = 'publish_preview'; |
56 | 51 | const String templatesPath = 'templates'; |
57 | 52 |
|
58 | | -/// STAT TRACKING |
| 53 | +/// Stats tracking constants |
59 | 54 | const String statsCollection = 'stats'; |
60 | 55 | const String lostStatsDoc = '_lost'; |
61 | 56 | const String viewsField = 'views'; |
|
0 commit comments