@africode/core 5.0.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.
- package/AFRICODE_FRAMEWORK_GUIDE.md +707 -0
- package/LICENSE +623 -0
- package/README.md +442 -0
- package/bin/africode.js +73 -0
- package/bin/africode.js.1758507140 +343 -0
- package/bin/cli.ts +83 -0
- package/bin/create-africode.js +158 -0
- package/bin/scaffold.ts +219 -0
- package/components/accordion.js +183 -0
- package/components/alert.js +131 -0
- package/components/auth.js +172 -0
- package/components/avatar.js +117 -0
- package/components/badge.js +104 -0
- package/components/base.d.ts +139 -0
- package/components/base.js +184 -0
- package/components/button.js +164 -0
- package/components/card.js +137 -0
- package/components/cultural-card.js +243 -0
- package/components/divider.js +83 -0
- package/components/dropdown.js +171 -0
- package/components/error-boundary.js +155 -0
- package/components/form.js +131 -0
- package/components/grid.js +273 -0
- package/components/hero.js +138 -0
- package/components/icon.js +36 -0
- package/components/index.js +57 -0
- package/components/input.js +256 -0
- package/components/kanga-card.js +185 -0
- package/components/language-switcher.js +108 -0
- package/components/loader.js +80 -0
- package/components/modal.js +262 -0
- package/components/motion.js +84 -0
- package/components/navbar.js +236 -0
- package/components/pattern-showcase.js +225 -0
- package/components/progress.js +134 -0
- package/components/react.js +111 -0
- package/components/section.js +54 -0
- package/components/select.js +322 -0
- package/components/sidebar.js +180 -0
- package/components/skeleton.js +85 -0
- package/components/table.js +181 -0
- package/components/tabs.js +202 -0
- package/components/theme-toggle.js +82 -0
- package/components/toast.js +139 -0
- package/components/tooltip.js +167 -0
- package/core/a2ui-schema-manager.js +344 -0
- package/core/a2ui.js +431 -0
- package/core/bun-runtime.js +799 -0
- package/core/cli/commands/add.js +23 -0
- package/core/cli/commands/audit.js +58 -0
- package/core/cli/commands/build.js +137 -0
- package/core/cli/commands/create-plugin.js +241 -0
- package/core/cli/commands/dev.js +228 -0
- package/core/cli/commands/lint.js +23 -0
- package/core/cli/commands/test.js +34 -0
- package/core/cli/migrator.js +71 -0
- package/core/cli/ui.js +46 -0
- package/core/compliance.js +628 -0
- package/core/config.js +263 -0
- package/core/db-advanced.js +481 -0
- package/core/db.js +284 -0
- package/core/enhanced-hmr.js +404 -0
- package/core/errors.js +222 -0
- package/core/file-router.js +290 -0
- package/core/heartbeat.js +64 -0
- package/core/hmr-client.js +204 -0
- package/core/hmr.js +196 -0
- package/core/html.d.ts +116 -0
- package/core/html.js +160 -0
- package/core/hydration.js +52 -0
- package/core/lipa-namba-journey.js +572 -0
- package/core/motion.js +106 -0
- package/core/nida-cig-middleware.js +455 -0
- package/core/patterns.d.ts +124 -0
- package/core/patterns.js +833 -0
- package/core/plugins/index.js +312 -0
- package/core/router.js +387 -0
- package/core/sdk-client.js +62 -0
- package/core/sdk.d.ts +133 -0
- package/core/sdk.js +123 -0
- package/core/seo.js +76 -0
- package/core/server/auth-endpoints.js +339 -0
- package/core/server/auth.js +180 -0
- package/core/server/csrf.js +206 -0
- package/core/server/db.js +39 -0
- package/core/server/middleware.js +324 -0
- package/core/server/rate-limit.js +238 -0
- package/core/server/render.js +69 -0
- package/core/server/router.js +120 -0
- package/core/shim.js +28 -0
- package/core/state.d.ts +86 -0
- package/core/state.js +242 -0
- package/core/store.d.ts +122 -0
- package/core/store.js +61 -0
- package/core/validation.d.ts +233 -0
- package/core/validation.js +590 -0
- package/core/websocket.js +639 -0
- package/dist/africode.js +2905 -0
- package/dist/africode.js.map +61 -0
- package/dist/build-info.json +23 -0
- package/dist/components.js +2888 -0
- package/dist/components.js.map +58 -0
- package/dist/styles/africanity.css +322 -0
- package/dist/styles/typography.css +141 -0
- package/docs/IDE-Guide.md +50 -0
- package/package.json +110 -0
- package/src/index.ts +196 -0
- package/styles/africanity.css +322 -0
- package/styles/typography.css +141 -0
- package/templates/starter/.env.example +15 -0
- package/templates/starter/africode.config.js +40 -0
- package/templates/starter/package.json +14 -0
- package/templates/starter/src/pages/index.html +46 -0
- package/templates/starter/src/pages/index.js +32 -0
- package/templates/starter/src/styles/main.css +4 -0
- package/templates/starter-3d/.env.example +7 -0
- package/templates/starter-3d/africode.config.js +29 -0
- package/templates/starter-3d/components/af-model-viewer.js +125 -0
- package/templates/starter-3d/package.json +15 -0
- package/templates/starter-3d/src/pages/index.html +46 -0
- package/templates/starter-3d/src/pages/index.js +50 -0
- package/templates/starter-3d/src/styles/main.css +4 -0
- package/templates/starter-react/.env.example +15 -0
- package/templates/starter-react/africode.config.js +40 -0
- package/templates/starter-react/package.json +16 -0
- package/templates/starter-react/src/pages/index.html +46 -0
- package/templates/starter-react/src/pages/index.js +68 -0
- package/templates/starter-react/src/styles/main.css +4 -0
- package/templates/starter-tailwind/.env.example +15 -0
- package/templates/starter-tailwind/africode.config.js +40 -0
- package/templates/starter-tailwind/package.json +20 -0
- package/templates/starter-tailwind/src/pages/index.html +46 -0
- package/templates/starter-tailwind/src/pages/index.js +37 -0
- package/templates/starter-tailwind/src/styles/main.css +4 -0
- package/templates/starter-tailwind/src/styles/tailwind.css +1 -0
- package/templates/starter-tailwind/src/tailwind-loader.js +30 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AfriCode v5.0.0 - Autonomous Framework Entry Point
|
|
3
|
+
* African-centric full-stack framework with AI safety and fintech compliance
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { createReactiveState, subscribe, createSignal, createEffect } from '../core/state.js';
|
|
7
|
+
import { store, actions } from '../core/store.js';
|
|
8
|
+
import patterns from '../core/patterns.js';
|
|
9
|
+
import * as motion from '../core/motion.js';
|
|
10
|
+
import { hydrate } from '../core/hydration.js';
|
|
11
|
+
import { html, Layout } from '../core/html.js';
|
|
12
|
+
import { schemas, Validation, rules, afri, AfriFieldBuilder, normalizeInput, buildSchema } from '../core/validation.js';
|
|
13
|
+
import { createFramework, getConfig } from '../core/config.js';
|
|
14
|
+
import {
|
|
15
|
+
AfriCodeError, ValidationError, InvalidUrlError,
|
|
16
|
+
SecurityError, CsrfError, RateLimitError,
|
|
17
|
+
DatabaseError, ComponentError
|
|
18
|
+
} from '../core/errors.js';
|
|
19
|
+
|
|
20
|
+
// v5.0.0 autonomous features
|
|
21
|
+
import { initA2UI, A2UIRenderer, A2UIProtocol } from '../core/a2ui.js';
|
|
22
|
+
import { NIDAClient, TIPSClient, AMLComplianceEngine, ComplianceMiddleware } from '../core/compliance.js';
|
|
23
|
+
import { initBunRuntime, HotReloadEngine, BunHTTPServer, BunDatabase, PerformanceMonitor } from '../core/bun-runtime.js';
|
|
24
|
+
import { EnhancedHMRMiddleware } from '../core/enhanced-hmr.js';
|
|
25
|
+
import { A2uiSchemaManager } from '../core/a2ui-schema-manager.js';
|
|
26
|
+
import { LipaNambaJourney } from '../core/lipa-namba-journey.js';
|
|
27
|
+
|
|
28
|
+
import { componentMap as coreMap } from '../components/index.js';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* AfriCode Framework Class
|
|
32
|
+
* Autonomous application lifecycle management
|
|
33
|
+
*/
|
|
34
|
+
export class AfriCode {
|
|
35
|
+
private config: any;
|
|
36
|
+
private server?: BunHTTPServer;
|
|
37
|
+
private hmr?: EnhancedHMRMiddleware;
|
|
38
|
+
private schemaManager?: A2uiSchemaManager;
|
|
39
|
+
|
|
40
|
+
constructor(config: {
|
|
41
|
+
port?: number;
|
|
42
|
+
pagesDir?: string;
|
|
43
|
+
publicDir?: string;
|
|
44
|
+
enableHMR?: boolean;
|
|
45
|
+
enableA2UI?: boolean;
|
|
46
|
+
fintechCompliance?: boolean;
|
|
47
|
+
} = {}) {
|
|
48
|
+
this.config = {
|
|
49
|
+
port: 3000,
|
|
50
|
+
pagesDir: 'pages',
|
|
51
|
+
publicDir: 'public',
|
|
52
|
+
enableHMR: true,
|
|
53
|
+
enableA2UI: true,
|
|
54
|
+
fintechCompliance: true,
|
|
55
|
+
...config
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Initialize the autonomous framework
|
|
61
|
+
*/
|
|
62
|
+
async initialize(): Promise<void> {
|
|
63
|
+
console.log('🚀 Initializing AfriCode v5.0.0...');
|
|
64
|
+
|
|
65
|
+
// Initialize Bun runtime
|
|
66
|
+
await initBunRuntime();
|
|
67
|
+
|
|
68
|
+
// Initialize A2UI schema manager
|
|
69
|
+
if (this.config.enableA2UI) {
|
|
70
|
+
this.schemaManager = new A2uiSchemaManager();
|
|
71
|
+
await this.schemaManager.generateManifest();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Initialize HMR if enabled
|
|
75
|
+
if (this.config.enableHMR) {
|
|
76
|
+
this.hmr = new EnhancedHMRMiddleware({
|
|
77
|
+
port: this.config.port + 1,
|
|
78
|
+
watchPaths: [this.config.pagesDir, 'components', 'core']
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
console.log('✅ AfriCode initialized successfully');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Start the autonomous server
|
|
87
|
+
*/
|
|
88
|
+
async start(): Promise<void> {
|
|
89
|
+
await this.initialize();
|
|
90
|
+
|
|
91
|
+
// Create HTTP server with file-based routing
|
|
92
|
+
this.server = new BunHTTPServer({
|
|
93
|
+
port: this.config.port,
|
|
94
|
+
pagesDir: this.config.pagesDir,
|
|
95
|
+
publicDir: this.config.publicDir,
|
|
96
|
+
middleware: [
|
|
97
|
+
this.config.fintechCompliance ? new ComplianceMiddleware() : null,
|
|
98
|
+
this.hmr
|
|
99
|
+
].filter(Boolean)
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// Start HMR if enabled
|
|
103
|
+
if (this.hmr) {
|
|
104
|
+
await this.hmr.initialize(this.server);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
await this.server.start();
|
|
108
|
+
console.log(`🌐 Server running on http://localhost:${this.config.port}`);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Stop the framework
|
|
113
|
+
*/
|
|
114
|
+
async stop(): Promise<void> {
|
|
115
|
+
if (this.server) {
|
|
116
|
+
await this.server.stop();
|
|
117
|
+
}
|
|
118
|
+
if (this.hmr) {
|
|
119
|
+
await this.hmr.shutdown();
|
|
120
|
+
}
|
|
121
|
+
console.log('🛑 AfriCode stopped');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Utility to initialize the full framework (legacy compatibility)
|
|
127
|
+
*/
|
|
128
|
+
export function init(projectComponentMap: Record<string, any> = {}): void {
|
|
129
|
+
if (typeof window !== 'undefined') {
|
|
130
|
+
console.log('🌍 AfriCode SDK Initialized (Zero-Config Mode)');
|
|
131
|
+
|
|
132
|
+
// Merge project map with core map
|
|
133
|
+
const finalMap = { ...coreMap, ...projectComponentMap };
|
|
134
|
+
|
|
135
|
+
if (Object.keys(finalMap).length > 0) {
|
|
136
|
+
hydrate(finalMap);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Core exports
|
|
142
|
+
export {
|
|
143
|
+
createReactiveState,
|
|
144
|
+
subscribe,
|
|
145
|
+
createSignal,
|
|
146
|
+
createEffect,
|
|
147
|
+
store,
|
|
148
|
+
actions,
|
|
149
|
+
patterns,
|
|
150
|
+
motion,
|
|
151
|
+
hydrate,
|
|
152
|
+
html,
|
|
153
|
+
Layout,
|
|
154
|
+
schemas,
|
|
155
|
+
Validation,
|
|
156
|
+
rules,
|
|
157
|
+
afri,
|
|
158
|
+
AfriFieldBuilder,
|
|
159
|
+
normalizeInput,
|
|
160
|
+
buildSchema,
|
|
161
|
+
createFramework,
|
|
162
|
+
getConfig,
|
|
163
|
+
AfriCodeError,
|
|
164
|
+
ValidationError,
|
|
165
|
+
InvalidUrlError,
|
|
166
|
+
SecurityError,
|
|
167
|
+
CsrfError,
|
|
168
|
+
RateLimitError,
|
|
169
|
+
DatabaseError,
|
|
170
|
+
ComponentError
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// v5.0.0 autonomous exports
|
|
174
|
+
export {
|
|
175
|
+
initA2UI,
|
|
176
|
+
A2UIRenderer,
|
|
177
|
+
A2UIProtocol,
|
|
178
|
+
NIDAClient,
|
|
179
|
+
TIPSClient,
|
|
180
|
+
AMLComplianceEngine,
|
|
181
|
+
ComplianceMiddleware,
|
|
182
|
+
initBunRuntime,
|
|
183
|
+
HotReloadEngine,
|
|
184
|
+
BunHTTPServer,
|
|
185
|
+
BunDatabase,
|
|
186
|
+
PerformanceMonitor,
|
|
187
|
+
EnhancedHMRMiddleware,
|
|
188
|
+
A2uiSchemaManager,
|
|
189
|
+
LipaNambaJourney
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// Component exports
|
|
193
|
+
export { componentMap as components } from '../components/index.js';
|
|
194
|
+
|
|
195
|
+
// Re-export for convenience
|
|
196
|
+
export default AfriCode;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Inter:wght@400;500;600;700;800;900&display=swap');
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* =========================================
|
|
5
|
+
CULTURAL PALETTES (Immutable Design Tokens)
|
|
6
|
+
========================================= */
|
|
7
|
+
/* Accents */
|
|
8
|
+
--afri-green: #1EB53A; /* Growth (Tanzania) */
|
|
9
|
+
--afri-gold: #FCD116; /* Wealth */
|
|
10
|
+
--afri-blue: #00A3DD; /* Water */
|
|
11
|
+
--afri-red: #EF3340; /* Vitality */
|
|
12
|
+
|
|
13
|
+
/* Maasai (Kenya/Tanzania) */
|
|
14
|
+
--maasai-red: #E31C23;
|
|
15
|
+
--maasai-blue: #00A3DD;
|
|
16
|
+
|
|
17
|
+
/* Kente (Ghana) */
|
|
18
|
+
--kente-gold: #FFD700;
|
|
19
|
+
--kente-green: #00966C;
|
|
20
|
+
|
|
21
|
+
/* Tuareg (Sahara) */
|
|
22
|
+
--tuareg-indigo: #2D3D6B;
|
|
23
|
+
--tuareg-sky: #6B8CC7;
|
|
24
|
+
--sahara-sand: #F4A460;
|
|
25
|
+
|
|
26
|
+
/* Ndebele (South Africa) */
|
|
27
|
+
--ndebele-pink: #FF69B4;
|
|
28
|
+
--ndebele-turquoise: #40E0D0;
|
|
29
|
+
|
|
30
|
+
/* =========================================
|
|
31
|
+
FRACTAL SPACING (FIBONACCI)
|
|
32
|
+
========================================= */
|
|
33
|
+
--space-5: 5px;
|
|
34
|
+
--space-8: 8px;
|
|
35
|
+
--space-13: 13px;
|
|
36
|
+
--space-21: 21px;
|
|
37
|
+
--space-34: 34px;
|
|
38
|
+
--space-55: 55px;
|
|
39
|
+
--space-89: 89px;
|
|
40
|
+
|
|
41
|
+
/* Motion */
|
|
42
|
+
--ease-drum: cubic-bezier(0.1, 0.9, 0.2, 1.0);
|
|
43
|
+
--ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
44
|
+
|
|
45
|
+
/* Typography */
|
|
46
|
+
--font-logo: 'Space Grotesk', sans-serif;
|
|
47
|
+
--font-body: 'Inter', system-ui, sans-serif;
|
|
48
|
+
|
|
49
|
+
/* Layout Standards */
|
|
50
|
+
--page-max-width: 1280px;
|
|
51
|
+
--nav-height: 80px;
|
|
52
|
+
--radius-lg: 12px;
|
|
53
|
+
--radius-md: 8px;
|
|
54
|
+
--radius-sm: 6px;
|
|
55
|
+
--glass-blur: 12px;
|
|
56
|
+
|
|
57
|
+
/* Backward-compatible aliases */
|
|
58
|
+
--brand-gold: var(--afri-gold);
|
|
59
|
+
--brand-green: var(--afri-green);
|
|
60
|
+
--slate-800: #1e293b;
|
|
61
|
+
--slate-900: #0f172a;
|
|
62
|
+
--slate-950: #020617;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* =========================================
|
|
66
|
+
THEME: PROFOUND DARK (Default)
|
|
67
|
+
========================================= */
|
|
68
|
+
:root, [data-theme="dark"] {
|
|
69
|
+
/* Base Backgrounds */
|
|
70
|
+
--afri-black: #050505;
|
|
71
|
+
--afri-void: #0f172a; /* Page Background */
|
|
72
|
+
--afri-charcoal: #1e293b; /* Surface 1 */
|
|
73
|
+
--afri-obsidian: #334155; /* Surface 2 */
|
|
74
|
+
|
|
75
|
+
/* Text System */
|
|
76
|
+
--text-primary: #f8fafc;
|
|
77
|
+
--text-secondary: #cbd5e1;
|
|
78
|
+
--text-muted: #94a3b8;
|
|
79
|
+
|
|
80
|
+
/* Structural Variables */
|
|
81
|
+
--bg-base: var(--afri-void);
|
|
82
|
+
--glass-bg: rgba(15, 23, 42, 0.7);
|
|
83
|
+
--glass-border: rgba(255, 255, 255, 0.1);
|
|
84
|
+
--border-color: var(--glass-border);
|
|
85
|
+
--text-main: var(--text-primary);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* =========================================
|
|
89
|
+
THEME: RADIANT LIGHT
|
|
90
|
+
========================================= */
|
|
91
|
+
[data-theme="light"] {
|
|
92
|
+
/* Base Backgrounds */
|
|
93
|
+
--afri-black: #ffffff;
|
|
94
|
+
--afri-void: #f8fafc; /* Page Background */
|
|
95
|
+
--afri-charcoal: #ffffff; /* Surface 1 */
|
|
96
|
+
--afri-obsidian: #e2e8f0; /* Surface 2 */
|
|
97
|
+
|
|
98
|
+
/* Text System */
|
|
99
|
+
--text-primary: #0f172a;
|
|
100
|
+
--text-secondary: #334155;
|
|
101
|
+
--text-muted: #64748b;
|
|
102
|
+
|
|
103
|
+
/* Structural Variables */
|
|
104
|
+
--bg-base: var(--afri-void);
|
|
105
|
+
--glass-bg: rgba(255, 255, 255, 0.7);
|
|
106
|
+
--glass-border: rgba(0, 0, 0, 0.1);
|
|
107
|
+
--border-color: var(--glass-border);
|
|
108
|
+
--text-main: var(--text-primary);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
body {
|
|
112
|
+
background-color: var(--afri-void);
|
|
113
|
+
color: var(--text-primary);
|
|
114
|
+
font-family: var(--font-body);
|
|
115
|
+
margin: 0;
|
|
116
|
+
padding: 0;
|
|
117
|
+
line-height: 1.6;
|
|
118
|
+
overflow-x: hidden;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Typography Overrides */
|
|
122
|
+
h1,
|
|
123
|
+
h2,
|
|
124
|
+
h3,
|
|
125
|
+
h4,
|
|
126
|
+
h5,
|
|
127
|
+
h6 {
|
|
128
|
+
font-family: var(--font-logo);
|
|
129
|
+
font-weight: 700;
|
|
130
|
+
letter-spacing: -0.025em;
|
|
131
|
+
color: var(--text-primary);
|
|
132
|
+
margin-top: 0;
|
|
133
|
+
margin-bottom: var(--space-21);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
h1 {
|
|
137
|
+
font-size: clamp(2.5rem, 5vw, 4rem);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
h2 {
|
|
141
|
+
font-size: clamp(2rem, 4vw, 3rem);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
h3 {
|
|
145
|
+
font-size: 1.5rem;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* =========================================
|
|
149
|
+
COMPONENT PREVIEW CARD (Global Design System)
|
|
150
|
+
Used in Showcase, Patterns, Components pages
|
|
151
|
+
========================================= */
|
|
152
|
+
.preview-card {
|
|
153
|
+
background: var(--afri-charcoal);
|
|
154
|
+
border: 1px solid var(--afri-obsidian);
|
|
155
|
+
border-radius: var(--radius-lg);
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
transition: border-color 0.3s ease, transform 0.3s ease;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.preview-card:hover {
|
|
163
|
+
border-color: var(--afri-green);
|
|
164
|
+
transform: translateY(-4px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.preview-header {
|
|
168
|
+
border-bottom: 1px solid var(--afri-obsidian);
|
|
169
|
+
padding: 16px 24px;
|
|
170
|
+
display: flex;
|
|
171
|
+
justify-content: space-between;
|
|
172
|
+
align-items: center;
|
|
173
|
+
background: rgba(0, 0, 0, 0.2);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.preview-title {
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
font-size: 0.9rem;
|
|
179
|
+
color: var(--text-primary);
|
|
180
|
+
text-transform: uppercase;
|
|
181
|
+
letter-spacing: 0.05em;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.preview-canvas {
|
|
185
|
+
padding: 40px;
|
|
186
|
+
background-image: radial-gradient(var(--afri-obsidian) 1px, transparent 1px);
|
|
187
|
+
background-size: 20px 20px;
|
|
188
|
+
flex-grow: 1;
|
|
189
|
+
display: flex;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
align-items: center;
|
|
192
|
+
min-height: 200px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Layout Utilities */
|
|
196
|
+
.page-container {
|
|
197
|
+
max-width: var(--page-max-width);
|
|
198
|
+
margin: 0 auto;
|
|
199
|
+
padding: 100px var(--space-34) var(--space-89);
|
|
200
|
+
min-height: 100vh;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.page-header {
|
|
204
|
+
text-align: center;
|
|
205
|
+
margin-bottom: var(--space-89);
|
|
206
|
+
position: relative;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.page-header h1 {
|
|
210
|
+
background: linear-gradient(to right, #4ade80, #38bdf8);
|
|
211
|
+
background-clip: text;
|
|
212
|
+
-webkit-background-clip: text;
|
|
213
|
+
-webkit-text-fill-color: transparent;
|
|
214
|
+
margin-bottom: var(--space-13);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.page-header p {
|
|
218
|
+
font-size: 1.25rem;
|
|
219
|
+
color: var(--text-secondary);
|
|
220
|
+
max-width: 600px;
|
|
221
|
+
margin: 0 auto;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Scrollbar */
|
|
225
|
+
::-webkit-scrollbar {
|
|
226
|
+
width: var(--space-8);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
::-webkit-scrollbar-track {
|
|
230
|
+
background: var(--afri-black);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
::-webkit-scrollbar-thumb {
|
|
234
|
+
background: var(--afri-obsidian);
|
|
235
|
+
border-radius: var(--space-5);
|
|
236
|
+
border: 2px solid var(--afri-black);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
::-webkit-scrollbar-thumb:hover {
|
|
240
|
+
background: var(--afri-green);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* =========================================
|
|
244
|
+
RESPONSIVE BREAKPOINTS
|
|
245
|
+
========================================= */
|
|
246
|
+
|
|
247
|
+
@media (max-width: 768px) {
|
|
248
|
+
:root {
|
|
249
|
+
--space-34: 24px;
|
|
250
|
+
--space-55: 40px;
|
|
251
|
+
--space-89: 60px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.page-container {
|
|
255
|
+
padding: 90px 20px 60px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.preview-card {
|
|
259
|
+
border-radius: var(--space-8);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.preview-canvas {
|
|
263
|
+
padding: 24px;
|
|
264
|
+
min-height: 150px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
h1 {
|
|
268
|
+
font-size: 2.5rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
h2 {
|
|
272
|
+
font-size: 1.8rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
h3 {
|
|
276
|
+
font-size: 1.25rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.page-header p {
|
|
280
|
+
font-size: 1rem;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Mobile Small */
|
|
285
|
+
@media (max-width: 480px) {
|
|
286
|
+
:root {
|
|
287
|
+
--space-21: 16px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.page-container {
|
|
291
|
+
padding: 85px 16px 40px;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* =========================================
|
|
295
|
+
COMPONENT FALLBACKS (Headless Proofing)
|
|
296
|
+
========================================= */
|
|
297
|
+
|
|
298
|
+
af-navbar:not(:defined) {
|
|
299
|
+
display: flex;
|
|
300
|
+
height: 80px;
|
|
301
|
+
background: rgba(15, 23, 42, 0.9);
|
|
302
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
303
|
+
align-items: center;
|
|
304
|
+
padding: 0 5%;
|
|
305
|
+
gap: 24px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
af-navbar:not(:defined) a {
|
|
309
|
+
color: #94a3b8;
|
|
310
|
+
text-decoration: none;
|
|
311
|
+
font-size: 0.9rem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
af-button:not(:defined) {
|
|
315
|
+
display: inline-flex;
|
|
316
|
+
padding: 12px 24px;
|
|
317
|
+
background: #1EB53A;
|
|
318
|
+
color: white;
|
|
319
|
+
border-radius: 8px;
|
|
320
|
+
font-weight: 600;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* AFRICODE CUSTOM TYPOGRAPHY SYSTEM
|
|
3
|
+
* "Our Own Font" - Pattern-Driven Text
|
|
4
|
+
*
|
|
5
|
+
* Instead of relying on external fonts, we create our own
|
|
6
|
+
* distinctive type using pattern fills, gradients, and effects.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Base fonts - clean foundation */
|
|
13
|
+
--font-base: 'Inter', system-ui, -apple-system, sans-serif;
|
|
14
|
+
--font-geo: var(--font-base);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body {
|
|
18
|
+
font-family: var(--font-base);
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* AFRICODE DISPLAY TYPE
|
|
24
|
+
* Bold, geometric, pattern-filled
|
|
25
|
+
*/
|
|
26
|
+
h1,
|
|
27
|
+
h2,
|
|
28
|
+
h3,
|
|
29
|
+
h4,
|
|
30
|
+
h5,
|
|
31
|
+
h6 {
|
|
32
|
+
font-family: var(--font-base);
|
|
33
|
+
font-weight: 900;
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
letter-spacing: 0.05em;
|
|
36
|
+
line-height: 1.0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* PATTERN-FILLED TEXT
|
|
41
|
+
* Text becomes a mask for our African patterns
|
|
42
|
+
*/
|
|
43
|
+
.afri-text {
|
|
44
|
+
font-weight: 900;
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
letter-spacing: 0.08em;
|
|
47
|
+
background: linear-gradient(135deg, var(--afri-green), var(--afri-gold));
|
|
48
|
+
background-clip: text;
|
|
49
|
+
-webkit-background-clip: text;
|
|
50
|
+
-webkit-text-fill-color: transparent;
|
|
51
|
+
color: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Pattern variants using SVG fills (set via JS) */
|
|
55
|
+
.afri-text-pattern {
|
|
56
|
+
font-weight: 900;
|
|
57
|
+
text-transform: uppercase;
|
|
58
|
+
letter-spacing: 0.08em;
|
|
59
|
+
background-size: 30px 30px;
|
|
60
|
+
background-clip: text;
|
|
61
|
+
-webkit-background-clip: text;
|
|
62
|
+
-webkit-text-fill-color: transparent;
|
|
63
|
+
color: transparent;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* GLOW EFFECT
|
|
68
|
+
* Adds depth and "vibrancy"
|
|
69
|
+
*/
|
|
70
|
+
.afri-text-glow {
|
|
71
|
+
text-shadow:
|
|
72
|
+
0 0 10px var(--afri-green),
|
|
73
|
+
0 0 20px rgba(30, 181, 58, 0.5),
|
|
74
|
+
0 0 40px rgba(30, 181, 58, 0.3);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
* STROKE OUTLINE STYLE
|
|
79
|
+
* For headers that need impact
|
|
80
|
+
*/
|
|
81
|
+
.afri-text-outline {
|
|
82
|
+
font-weight: 900;
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
letter-spacing: 0.1em;
|
|
85
|
+
color: transparent;
|
|
86
|
+
-webkit-text-stroke: 2px var(--afri-gold);
|
|
87
|
+
text-stroke: 2px var(--afri-gold);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* DUOTONE GRADIENT
|
|
92
|
+
* African sunset/earth tones
|
|
93
|
+
*/
|
|
94
|
+
.afri-text-earth {
|
|
95
|
+
font-weight: 900;
|
|
96
|
+
background: linear-gradient(180deg, #CD853F 0%, #8B4513 100%);
|
|
97
|
+
background-clip: text;
|
|
98
|
+
-webkit-background-clip: text;
|
|
99
|
+
-webkit-text-fill-color: transparent;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.afri-text-sunset {
|
|
103
|
+
font-weight: 900;
|
|
104
|
+
background: linear-gradient(135deg, #FF6B00 0%, #FCD116 50%, #1EB53A 100%);
|
|
105
|
+
background-clip: text;
|
|
106
|
+
-webkit-background-clip: text;
|
|
107
|
+
-webkit-text-fill-color: transparent;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
* STACKED/LAYERED TEXT
|
|
112
|
+
* Creates depth illusion
|
|
113
|
+
*/
|
|
114
|
+
.afri-text-stack {
|
|
115
|
+
position: relative;
|
|
116
|
+
font-weight: 900;
|
|
117
|
+
text-transform: uppercase;
|
|
118
|
+
color: var(--afri-gold);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.afri-text-stack::before {
|
|
122
|
+
content: attr(data-text);
|
|
123
|
+
position: absolute;
|
|
124
|
+
left: 3px;
|
|
125
|
+
top: 3px;
|
|
126
|
+
color: var(--afri-green);
|
|
127
|
+
z-index: -1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/*
|
|
131
|
+
* VERNACULAR ACCENT
|
|
132
|
+
* For energetic callouts
|
|
133
|
+
*/
|
|
134
|
+
.vernacular {
|
|
135
|
+
font-weight: 800;
|
|
136
|
+
font-style: italic;
|
|
137
|
+
text-transform: uppercase;
|
|
138
|
+
letter-spacing: 0.15em;
|
|
139
|
+
transform: skewX(-5deg);
|
|
140
|
+
display: inline-block;
|
|
141
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# AfriCode Environment Configuration
|
|
2
|
+
|
|
3
|
+
# Server Settings
|
|
4
|
+
PORT=3000
|
|
5
|
+
NODE_ENV=development
|
|
6
|
+
|
|
7
|
+
# Database Settings
|
|
8
|
+
DB_FILE=./data.db
|
|
9
|
+
|
|
10
|
+
# Security
|
|
11
|
+
SESSION_SECRET=replace_this_with_a_long_random_string
|
|
12
|
+
JWT_SECRET=replace_this_with_another_long_random_string
|
|
13
|
+
|
|
14
|
+
# API Keys (Add yours here)
|
|
15
|
+
# PUBLIC_API_URL=http://localhost:3000
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AfriCode Framework Configuration
|
|
3
|
+
*/
|
|
4
|
+
export default {
|
|
5
|
+
// Project entry point
|
|
6
|
+
entry: 'src/index.js',
|
|
7
|
+
|
|
8
|
+
// Server Configuration
|
|
9
|
+
server: {
|
|
10
|
+
port: process.env.PORT || 3000,
|
|
11
|
+
host: '0.0.0.0',
|
|
12
|
+
staticDir: 'public',
|
|
13
|
+
cors: true
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// Directory structure mapping
|
|
17
|
+
directories: {
|
|
18
|
+
src: 'src',
|
|
19
|
+
pages: 'src/pages',
|
|
20
|
+
components: 'src/components',
|
|
21
|
+
styles: 'src/styles',
|
|
22
|
+
build: 'dist'
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
// Database Configuration (SQLite)
|
|
26
|
+
database: {
|
|
27
|
+
client: 'sqlite',
|
|
28
|
+
connection: {
|
|
29
|
+
filename: process.env.DB_FILE || './data.db'
|
|
30
|
+
},
|
|
31
|
+
useNullAsDefault: true,
|
|
32
|
+
walMode: true // Write-Ahead Logging for performance
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// Theme defaults
|
|
36
|
+
theme: {
|
|
37
|
+
default: 'dark',
|
|
38
|
+
toggleAttribute: 'data-theme'
|
|
39
|
+
}
|
|
40
|
+
};
|