@akanjs/cli 0.0.125 → 0.0.127

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/cjs/index.js CHANGED
@@ -1186,6 +1186,10 @@ var WorkspaceExecutor = class _WorkspaceExecutor extends Executor {
1186
1186
  async getPkgs() {
1187
1187
  return await this.#getDirHasFile(`${this.workspaceRoot}/pkgs`, "package.json");
1188
1188
  }
1189
+ async getExecs() {
1190
+ const [appNames, libNames, pkgNames] = await Promise.all([this.getApps(), this.getLibs(), this.getPkgs()]);
1191
+ return [appNames, libNames, pkgNames];
1192
+ }
1189
1193
  setTsPaths(type, name) {
1190
1194
  const rootTsConfig = this.readJson("tsconfig.json");
1191
1195
  if (type === "lib")
@@ -1856,6 +1860,7 @@ var createArgMetaDecorator = (type) => {
1856
1860
  var App = createArgMetaDecorator("App");
1857
1861
  var Lib = createArgMetaDecorator("Lib");
1858
1862
  var Sys = createArgMetaDecorator("Sys");
1863
+ var Exec = createArgMetaDecorator("Exec");
1859
1864
  var Pkg = createArgMetaDecorator("Pkg");
1860
1865
  var Workspace = createArgMetaDecorator("Workspace");
1861
1866
 
@@ -1958,7 +1963,7 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1958
1963
  if (argMeta.type === "Workspace")
1959
1964
  return workspace;
1960
1965
  const sysType = argMeta.type.toLowerCase();
1961
- const [appNames, libNames] = await workspace.getSyss();
1966
+ const [appNames, libNames, pkgNames] = await workspace.getExecs();
1962
1967
  if (sysType === "sys") {
1963
1968
  if (value && appNames.includes(value))
1964
1969
  return AppExecutor.from(workspace, value);
@@ -1976,6 +1981,27 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1976
1981
  else
1977
1982
  throw new Error(`Invalid system name: ${sysName}`);
1978
1983
  }
1984
+ } else if (sysType === "exec") {
1985
+ if (value && appNames.includes(value))
1986
+ return AppExecutor.from(workspace, value);
1987
+ else if (value && libNames.includes(value))
1988
+ return LibExecutor.from(workspace, value);
1989
+ else if (value && pkgNames.includes(value))
1990
+ return PkgExecutor.from(workspace, value);
1991
+ else {
1992
+ const execName = await (0, import_prompts3.select)({
1993
+ message: `Select the App or Lib or Pkg name`,
1994
+ choices: [...appNames, ...libNames, ...pkgNames]
1995
+ });
1996
+ if (appNames.includes(execName))
1997
+ return AppExecutor.from(workspace, execName);
1998
+ else if (libNames.includes(execName))
1999
+ return LibExecutor.from(workspace, execName);
2000
+ else if (pkgNames.includes(execName))
2001
+ return PkgExecutor.from(workspace, execName);
2002
+ else
2003
+ throw new Error(`Invalid system name: ${execName}`);
2004
+ }
1979
2005
  } else if (sysType === "app") {
1980
2006
  if (value && appNames.includes(value))
1981
2007
  return AppExecutor.from(workspace, value);
@@ -6257,6 +6283,9 @@ var WorkspaceRunner = class {
6257
6283
  };
6258
6284
  workspace.writeJson(`infra/master/mongo-connections.json`, mongoConnectionList);
6259
6285
  }
6286
+ async lint(exec2, workspace, { fix = true } = {}) {
6287
+ await workspace.spawn("node", ["node_modules/eslint/bin/eslint.js", exec2.cwdPath, ...fix ? ["--fix"] : []]);
6288
+ }
6260
6289
  };
6261
6290
 
6262
6291
  // pkgs/@akanjs/cli/src/workspace/workspace.script.ts
@@ -6276,6 +6305,25 @@ var WorkspaceScript = class {
6276
6305
  await this.#runner.generateMongo(workspace);
6277
6306
  workspace.log(`Mongo connections generated in infra/master/mongo-connections.json`);
6278
6307
  }
6308
+ async lint(exec2, workspace, { fix = true } = {}) {
6309
+ if (exec2 instanceof AppExecutor)
6310
+ await this.applicationScript.syncApplication(exec2);
6311
+ else if (exec2 instanceof LibExecutor)
6312
+ await this.libraryScript.syncLibrary(exec2);
6313
+ await this.#runner.lint(exec2, workspace, { fix });
6314
+ }
6315
+ async lintAll(workspace, { fix = true } = {}) {
6316
+ const [appNames, libNames, pkgNames] = await workspace.getExecs();
6317
+ await Promise.all(
6318
+ appNames.map((appName) => this.applicationScript.syncApplication(AppExecutor.from(workspace, appName)))
6319
+ );
6320
+ await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName))));
6321
+ await Promise.all([
6322
+ ...appNames.map((appName) => this.#runner.lint(AppExecutor.from(workspace, appName), workspace, { fix })),
6323
+ ...libNames.map((libName) => this.#runner.lint(LibExecutor.from(workspace, libName), workspace, { fix })),
6324
+ ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.#runner.lint(PkgExecutor.from(workspace, pkgName), workspace, { fix }))
6325
+ ]);
6326
+ }
6279
6327
  };
6280
6328
 
6281
6329
  // pkgs/@akanjs/cli/src/workspace/workspace.command.ts
@@ -6287,17 +6335,34 @@ var WorkspaceCommand = class {
6287
6335
  async generateMongo(workspace) {
6288
6336
  await this.workspaceScript.generateMongo(workspace);
6289
6337
  }
6338
+ async lint(exec2, fix, workspace) {
6339
+ await this.workspaceScript.lint(exec2, workspace, { fix });
6340
+ }
6341
+ async lintAll(fix, workspace) {
6342
+ await this.workspaceScript.lintAll(workspace, { fix });
6343
+ }
6290
6344
  };
6291
6345
  __decorateClass([
6292
6346
  Target.Public(),
6293
6347
  __decorateParam(0, Option("name", { desc: "what is the name of your organization?" })),
6294
- __decorateParam(1, Option("app", { desc: "describe your first application to create." })),
6348
+ __decorateParam(1, Option("app", { desc: "describe your first application to create " })),
6295
6349
  __decorateParam(2, Option("dir", { desc: "directory of workspace", default: process.env.USE_AKANJS_PKGS === "true" ? "local" : "." }))
6296
6350
  ], WorkspaceCommand.prototype, "createWorkspace", 1);
6297
6351
  __decorateClass([
6298
6352
  Target.Public(),
6299
6353
  __decorateParam(0, Workspace())
6300
6354
  ], WorkspaceCommand.prototype, "generateMongo", 1);
6355
+ __decorateClass([
6356
+ Target.Public(),
6357
+ __decorateParam(0, Exec()),
6358
+ __decorateParam(1, Option("fix", { type: "boolean", default: true })),
6359
+ __decorateParam(2, Workspace())
6360
+ ], WorkspaceCommand.prototype, "lint", 1);
6361
+ __decorateClass([
6362
+ Target.Public(),
6363
+ __decorateParam(0, Option("fix", { type: "boolean", default: true })),
6364
+ __decorateParam(1, Workspace())
6365
+ ], WorkspaceCommand.prototype, "lintAll", 1);
6301
6366
  WorkspaceCommand = __decorateClass([
6302
6367
  Commands()
6303
6368
  ], WorkspaceCommand);
@@ -26,19 +26,99 @@ function getContent(scanResult, dict) {
26
26
  return {
27
27
  filename: "page.tsx",
28
28
  content: `
29
- import { Image, Link } from "@util/ui";
30
- import { getSelf } from "@akanjs/client";
29
+ import {
30
+ FaBolt,
31
+ FaBook,
32
+ FaCloudUploadAlt,
33
+ FaCode,
34
+ FaExternalLinkAlt,
35
+ FaGraduationCap,
36
+ FaHeart,
37
+ FaShieldAlt,
38
+ } from "react-icons/fa";
39
+
40
+ export const metadata = {
41
+ title: "Akan.js",
42
+ };
31
43
 
32
44
  export default function Page() {
33
- const self = getSelf();
34
45
  return (
35
- <div className="relative w-full h-screen overflow-hidden flex items-center justify-center">
36
- <div className="max-w-md bg-base-100/50 shadow-lg rounded-xl backdrop-blur-xs w-full py-8 px-16 flex flex-col items-center justify-center gap-3">
37
- <h1 className="text-4xl mt-2">${dict.appName}</h1>
38
- <h2 className="text-lg">${dict.appName} description</h2>
39
- <Link className="w-full" href={self ? "/self" : "/signin"}>
40
- <button className="btn w-full btn-primary">Go to dashboard</button>
41
- </Link>
46
+ <div className="bg-base-100 flex min-h-screen items-center justify-center">
47
+ <div className="container mx-auto px-4 py-16">
48
+ <div className="mb-16 text-center">
49
+ <h1 className="mb-6 text-6xl font-bold">Akan.js</h1>
50
+ <p className="mx-auto max-w-2xl text-lg">A typescript full-stack framework designed for solo developers</p>
51
+ <p className="mx-auto max-w-2xl text-lg">that enables building servers, web, and apps all at once</p>
52
+ <p className="mx-auto max-w-2xl text-lg">making in-house development with minimal resources.</p>
53
+ <div className="my-8 flex flex-wrap justify-center gap-4">
54
+ <div className="badge badge-lg text-base-100 bg-primary border-none">
55
+ <FaBolt className="" />
56
+ All-in-One
57
+ </div>
58
+ <div className="badge badge-lg text-base-100 bg-secondary border-none">
59
+ <FaShieldAlt className="" />
60
+ Type-Safe
61
+ </div>
62
+ <div className="badge badge-lg text-base-100 bg-success border-none">
63
+ <FaHeart className="" />
64
+ Minimal-Code
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <div className="mb-12 text-center">
69
+ <button className="btn btn-primary btn-lg bg-primary border-none px-12 py-4 text-lg font-semibold">
70
+ <FaCloudUploadAlt className="mr-3 text-xl" />
71
+ Deploy Now
72
+ </button>
73
+ </div>
74
+ <div className="mb-16 rounded-lg bg-slate-800 p-8">
75
+ <h2 className="text-gray-200 mb-6 text-center text-2xl font-bold">Quick Start</h2>
76
+ <div className="mockup-code">
77
+ <pre data-prefix="$">
78
+ <code className="text-success">npx create-akan-workspace</code>
79
+ </pre>
80
+ <pre data-prefix="$">
81
+ <code className="text-success">cd my-workspace</code>
82
+ </pre>
83
+ <pre data-prefix="$">
84
+ <code className="text-success">akan start my-app</code>
85
+ </pre>
86
+ </div>
87
+ </div>
88
+ <div className="mb-16 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4">
89
+ <div className="card bg-slate-800">
90
+ <div className="card-body p-6 text-center">
91
+ <FaBook className="mx-auto mb-4 text-4xl text-purple-400" />
92
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Documentation</h3>
93
+ <p className="mb-4 text-sm text-gray-400">Complete API guides and tutorials</p>
94
+ <button className="btn btn-sm w-full">Read Documentation</button>
95
+ </div>
96
+ </div>
97
+ <div className="card bg-slate-800">
98
+ <div className="card-body p-6 text-center">
99
+ <FaGraduationCap className="mx-auto mb-4 text-4xl text-blue-400" />
100
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Learn</h3>
101
+ <p className="mb-4 text-sm text-gray-400">Step-by-step learning guides</p>
102
+ <button className="btn btn-sm w-full">Learn</button>
103
+ </div>
104
+ </div>
105
+ <div className="card bg-slate-800">
106
+ <div className="card-body p-6 text-center">
107
+ <FaCode className="mx-auto mb-4 text-4xl text-green-400" />
108
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Examples</h3>
109
+ <p className="mb-4 text-sm text-gray-400">Real project examples</p>
110
+ <button className="btn btn-sm w-full">Examples</button>
111
+ </div>
112
+ </div>
113
+ <div className="card bg-slate-800">
114
+ <div className="card-body p-6 text-center">
115
+ <FaExternalLinkAlt className="mx-auto mb-4 text-4xl text-yellow-400" />
116
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Official Site</h3>
117
+ <p className="mb-4 text-sm text-gray-400">Visit our official website</p>
118
+ <button className="btn btn-sm w-full">Go to akanjs.com</button>
119
+ </div>
120
+ </div>
121
+ </div>
42
122
  </div>
43
123
  </div>
44
124
  );
@@ -0,0 +1,51 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // pkgs/@akanjs/cli/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.tsx
20
+ var page_exports = {};
21
+ __export(page_exports, {
22
+ default: () => getContent
23
+ });
24
+ module.exports = __toCommonJS(page_exports);
25
+ function getContent(scanResult, dict) {
26
+ return {
27
+ filename: "page.tsx",
28
+ content: `
29
+ import { Load, System } from "@shared/ui";
30
+
31
+ interface PageProps {
32
+ searchParams: Promise<{
33
+ p?: string;
34
+ }>;
35
+ }
36
+
37
+ export default function Page({ searchParams }: PageProps) {
38
+ return (
39
+ <Load.Page
40
+ of={Page}
41
+ loader={async () => {
42
+ const { p } = await searchParams;
43
+ return { p } as const;
44
+ }}
45
+ render={({ p }) => <System.Reconnect dev={true} />}
46
+ />
47
+ );
48
+ }
49
+ `
50
+ };
51
+ }
@@ -28,7 +28,7 @@ function getContent(scanResult, dict) {
28
28
  content: `
29
29
  import { bootCsr } from "@akanjs/next";
30
30
 
31
- void bootCsr(import.meta.glob("./**/*.tsx"), "./[lang]/${dict.appName}/layout.tsx");
31
+ void bootCsr(import.meta.glob("./**/*.tsx"), "./[lang]/${dict.appName}/layout.tsx", "/");
32
32
  `
33
33
  };
34
34
  }
@@ -10,6 +10,7 @@
10
10
  "daisyui": "^5.0.35"
11
11
  },
12
12
  "devDependencies": {
13
+ "@tailwindcss/postcss": "^4.1.7",
13
14
  "@types/react": "18.3.1",
14
15
  "@types/react-dom": "18.3.1",
15
16
  "crypto-browserify": "^3.12.1",
@@ -22,6 +23,9 @@
22
23
  "process": "^0.11.10",
23
24
  "stream-browserify": "^3.0.0",
24
25
  "stream-http": "^3.2.0",
26
+ "tailwind-scrollbar": "4.0.2",
27
+ "tailwindcss-animation-delay": "^2.0.2",
28
+ "tailwindcss-radix": "^4.0.2",
25
29
  "ts-jest": "^29.3.4",
26
30
  "url-polyfill": "^1.1.13",
27
31
  "vite": "^6.3.5",
package/esm/index.js CHANGED
@@ -1173,6 +1173,10 @@ var WorkspaceExecutor = class _WorkspaceExecutor extends Executor {
1173
1173
  async getPkgs() {
1174
1174
  return await this.#getDirHasFile(`${this.workspaceRoot}/pkgs`, "package.json");
1175
1175
  }
1176
+ async getExecs() {
1177
+ const [appNames, libNames, pkgNames] = await Promise.all([this.getApps(), this.getLibs(), this.getPkgs()]);
1178
+ return [appNames, libNames, pkgNames];
1179
+ }
1176
1180
  setTsPaths(type, name) {
1177
1181
  const rootTsConfig = this.readJson("tsconfig.json");
1178
1182
  if (type === "lib")
@@ -1843,6 +1847,7 @@ var createArgMetaDecorator = (type) => {
1843
1847
  var App = createArgMetaDecorator("App");
1844
1848
  var Lib = createArgMetaDecorator("Lib");
1845
1849
  var Sys = createArgMetaDecorator("Sys");
1850
+ var Exec = createArgMetaDecorator("Exec");
1846
1851
  var Pkg = createArgMetaDecorator("Pkg");
1847
1852
  var Workspace = createArgMetaDecorator("Workspace");
1848
1853
 
@@ -1945,7 +1950,7 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1945
1950
  if (argMeta.type === "Workspace")
1946
1951
  return workspace;
1947
1952
  const sysType = argMeta.type.toLowerCase();
1948
- const [appNames, libNames] = await workspace.getSyss();
1953
+ const [appNames, libNames, pkgNames] = await workspace.getExecs();
1949
1954
  if (sysType === "sys") {
1950
1955
  if (value && appNames.includes(value))
1951
1956
  return AppExecutor.from(workspace, value);
@@ -1963,6 +1968,27 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1963
1968
  else
1964
1969
  throw new Error(`Invalid system name: ${sysName}`);
1965
1970
  }
1971
+ } else if (sysType === "exec") {
1972
+ if (value && appNames.includes(value))
1973
+ return AppExecutor.from(workspace, value);
1974
+ else if (value && libNames.includes(value))
1975
+ return LibExecutor.from(workspace, value);
1976
+ else if (value && pkgNames.includes(value))
1977
+ return PkgExecutor.from(workspace, value);
1978
+ else {
1979
+ const execName = await select2({
1980
+ message: `Select the App or Lib or Pkg name`,
1981
+ choices: [...appNames, ...libNames, ...pkgNames]
1982
+ });
1983
+ if (appNames.includes(execName))
1984
+ return AppExecutor.from(workspace, execName);
1985
+ else if (libNames.includes(execName))
1986
+ return LibExecutor.from(workspace, execName);
1987
+ else if (pkgNames.includes(execName))
1988
+ return PkgExecutor.from(workspace, execName);
1989
+ else
1990
+ throw new Error(`Invalid system name: ${execName}`);
1991
+ }
1966
1992
  } else if (sysType === "app") {
1967
1993
  if (value && appNames.includes(value))
1968
1994
  return AppExecutor.from(workspace, value);
@@ -6244,6 +6270,9 @@ var WorkspaceRunner = class {
6244
6270
  };
6245
6271
  workspace.writeJson(`infra/master/mongo-connections.json`, mongoConnectionList);
6246
6272
  }
6273
+ async lint(exec2, workspace, { fix = true } = {}) {
6274
+ await workspace.spawn("node", ["node_modules/eslint/bin/eslint.js", exec2.cwdPath, ...fix ? ["--fix"] : []]);
6275
+ }
6247
6276
  };
6248
6277
 
6249
6278
  // pkgs/@akanjs/cli/src/workspace/workspace.script.ts
@@ -6263,6 +6292,25 @@ var WorkspaceScript = class {
6263
6292
  await this.#runner.generateMongo(workspace);
6264
6293
  workspace.log(`Mongo connections generated in infra/master/mongo-connections.json`);
6265
6294
  }
6295
+ async lint(exec2, workspace, { fix = true } = {}) {
6296
+ if (exec2 instanceof AppExecutor)
6297
+ await this.applicationScript.syncApplication(exec2);
6298
+ else if (exec2 instanceof LibExecutor)
6299
+ await this.libraryScript.syncLibrary(exec2);
6300
+ await this.#runner.lint(exec2, workspace, { fix });
6301
+ }
6302
+ async lintAll(workspace, { fix = true } = {}) {
6303
+ const [appNames, libNames, pkgNames] = await workspace.getExecs();
6304
+ await Promise.all(
6305
+ appNames.map((appName) => this.applicationScript.syncApplication(AppExecutor.from(workspace, appName)))
6306
+ );
6307
+ await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName))));
6308
+ await Promise.all([
6309
+ ...appNames.map((appName) => this.#runner.lint(AppExecutor.from(workspace, appName), workspace, { fix })),
6310
+ ...libNames.map((libName) => this.#runner.lint(LibExecutor.from(workspace, libName), workspace, { fix })),
6311
+ ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.#runner.lint(PkgExecutor.from(workspace, pkgName), workspace, { fix }))
6312
+ ]);
6313
+ }
6266
6314
  };
6267
6315
 
6268
6316
  // pkgs/@akanjs/cli/src/workspace/workspace.command.ts
@@ -6274,17 +6322,34 @@ var WorkspaceCommand = class {
6274
6322
  async generateMongo(workspace) {
6275
6323
  await this.workspaceScript.generateMongo(workspace);
6276
6324
  }
6325
+ async lint(exec2, fix, workspace) {
6326
+ await this.workspaceScript.lint(exec2, workspace, { fix });
6327
+ }
6328
+ async lintAll(fix, workspace) {
6329
+ await this.workspaceScript.lintAll(workspace, { fix });
6330
+ }
6277
6331
  };
6278
6332
  __decorateClass([
6279
6333
  Target.Public(),
6280
6334
  __decorateParam(0, Option("name", { desc: "what is the name of your organization?" })),
6281
- __decorateParam(1, Option("app", { desc: "describe your first application to create." })),
6335
+ __decorateParam(1, Option("app", { desc: "describe your first application to create " })),
6282
6336
  __decorateParam(2, Option("dir", { desc: "directory of workspace", default: process.env.USE_AKANJS_PKGS === "true" ? "local" : "." }))
6283
6337
  ], WorkspaceCommand.prototype, "createWorkspace", 1);
6284
6338
  __decorateClass([
6285
6339
  Target.Public(),
6286
6340
  __decorateParam(0, Workspace())
6287
6341
  ], WorkspaceCommand.prototype, "generateMongo", 1);
6342
+ __decorateClass([
6343
+ Target.Public(),
6344
+ __decorateParam(0, Exec()),
6345
+ __decorateParam(1, Option("fix", { type: "boolean", default: true })),
6346
+ __decorateParam(2, Workspace())
6347
+ ], WorkspaceCommand.prototype, "lint", 1);
6348
+ __decorateClass([
6349
+ Target.Public(),
6350
+ __decorateParam(0, Option("fix", { type: "boolean", default: true })),
6351
+ __decorateParam(1, Workspace())
6352
+ ], WorkspaceCommand.prototype, "lintAll", 1);
6288
6353
  WorkspaceCommand = __decorateClass([
6289
6354
  Commands()
6290
6355
  ], WorkspaceCommand);
@@ -3,19 +3,99 @@ function getContent(scanResult, dict) {
3
3
  return {
4
4
  filename: "page.tsx",
5
5
  content: `
6
- import { Image, Link } from "@util/ui";
7
- import { getSelf } from "@akanjs/client";
6
+ import {
7
+ FaBolt,
8
+ FaBook,
9
+ FaCloudUploadAlt,
10
+ FaCode,
11
+ FaExternalLinkAlt,
12
+ FaGraduationCap,
13
+ FaHeart,
14
+ FaShieldAlt,
15
+ } from "react-icons/fa";
16
+
17
+ export const metadata = {
18
+ title: "Akan.js",
19
+ };
8
20
 
9
21
  export default function Page() {
10
- const self = getSelf();
11
22
  return (
12
- <div className="relative w-full h-screen overflow-hidden flex items-center justify-center">
13
- <div className="max-w-md bg-base-100/50 shadow-lg rounded-xl backdrop-blur-xs w-full py-8 px-16 flex flex-col items-center justify-center gap-3">
14
- <h1 className="text-4xl mt-2">${dict.appName}</h1>
15
- <h2 className="text-lg">${dict.appName} description</h2>
16
- <Link className="w-full" href={self ? "/self" : "/signin"}>
17
- <button className="btn w-full btn-primary">Go to dashboard</button>
18
- </Link>
23
+ <div className="bg-base-100 flex min-h-screen items-center justify-center">
24
+ <div className="container mx-auto px-4 py-16">
25
+ <div className="mb-16 text-center">
26
+ <h1 className="mb-6 text-6xl font-bold">Akan.js</h1>
27
+ <p className="mx-auto max-w-2xl text-lg">A typescript full-stack framework designed for solo developers</p>
28
+ <p className="mx-auto max-w-2xl text-lg">that enables building servers, web, and apps all at once</p>
29
+ <p className="mx-auto max-w-2xl text-lg">making in-house development with minimal resources.</p>
30
+ <div className="my-8 flex flex-wrap justify-center gap-4">
31
+ <div className="badge badge-lg text-base-100 bg-primary border-none">
32
+ <FaBolt className="" />
33
+ All-in-One
34
+ </div>
35
+ <div className="badge badge-lg text-base-100 bg-secondary border-none">
36
+ <FaShieldAlt className="" />
37
+ Type-Safe
38
+ </div>
39
+ <div className="badge badge-lg text-base-100 bg-success border-none">
40
+ <FaHeart className="" />
41
+ Minimal-Code
42
+ </div>
43
+ </div>
44
+ </div>
45
+ <div className="mb-12 text-center">
46
+ <button className="btn btn-primary btn-lg bg-primary border-none px-12 py-4 text-lg font-semibold">
47
+ <FaCloudUploadAlt className="mr-3 text-xl" />
48
+ Deploy Now
49
+ </button>
50
+ </div>
51
+ <div className="mb-16 rounded-lg bg-slate-800 p-8">
52
+ <h2 className="text-gray-200 mb-6 text-center text-2xl font-bold">Quick Start</h2>
53
+ <div className="mockup-code">
54
+ <pre data-prefix="$">
55
+ <code className="text-success">npx create-akan-workspace</code>
56
+ </pre>
57
+ <pre data-prefix="$">
58
+ <code className="text-success">cd my-workspace</code>
59
+ </pre>
60
+ <pre data-prefix="$">
61
+ <code className="text-success">akan start my-app</code>
62
+ </pre>
63
+ </div>
64
+ </div>
65
+ <div className="mb-16 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4">
66
+ <div className="card bg-slate-800">
67
+ <div className="card-body p-6 text-center">
68
+ <FaBook className="mx-auto mb-4 text-4xl text-purple-400" />
69
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Documentation</h3>
70
+ <p className="mb-4 text-sm text-gray-400">Complete API guides and tutorials</p>
71
+ <button className="btn btn-sm w-full">Read Documentation</button>
72
+ </div>
73
+ </div>
74
+ <div className="card bg-slate-800">
75
+ <div className="card-body p-6 text-center">
76
+ <FaGraduationCap className="mx-auto mb-4 text-4xl text-blue-400" />
77
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Learn</h3>
78
+ <p className="mb-4 text-sm text-gray-400">Step-by-step learning guides</p>
79
+ <button className="btn btn-sm w-full">Learn</button>
80
+ </div>
81
+ </div>
82
+ <div className="card bg-slate-800">
83
+ <div className="card-body p-6 text-center">
84
+ <FaCode className="mx-auto mb-4 text-4xl text-green-400" />
85
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Examples</h3>
86
+ <p className="mb-4 text-sm text-gray-400">Real project examples</p>
87
+ <button className="btn btn-sm w-full">Examples</button>
88
+ </div>
89
+ </div>
90
+ <div className="card bg-slate-800">
91
+ <div className="card-body p-6 text-center">
92
+ <FaExternalLinkAlt className="mx-auto mb-4 text-4xl text-yellow-400" />
93
+ <h3 className="text-gray-200 mb-2 text-lg font-semibold">Official Site</h3>
94
+ <p className="mb-4 text-sm text-gray-400">Visit our official website</p>
95
+ <button className="btn btn-sm w-full">Go to akanjs.com</button>
96
+ </div>
97
+ </div>
98
+ </div>
19
99
  </div>
20
100
  </div>
21
101
  );
@@ -0,0 +1,31 @@
1
+ // pkgs/@akanjs/cli/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.tsx
2
+ function getContent(scanResult, dict) {
3
+ return {
4
+ filename: "page.tsx",
5
+ content: `
6
+ import { Load, System } from "@shared/ui";
7
+
8
+ interface PageProps {
9
+ searchParams: Promise<{
10
+ p?: string;
11
+ }>;
12
+ }
13
+
14
+ export default function Page({ searchParams }: PageProps) {
15
+ return (
16
+ <Load.Page
17
+ of={Page}
18
+ loader={async () => {
19
+ const { p } = await searchParams;
20
+ return { p } as const;
21
+ }}
22
+ render={({ p }) => <System.Reconnect dev={true} />}
23
+ />
24
+ );
25
+ }
26
+ `
27
+ };
28
+ }
29
+ export {
30
+ getContent as default
31
+ };
@@ -5,7 +5,7 @@ function getContent(scanResult, dict) {
5
5
  content: `
6
6
  import { bootCsr } from "@akanjs/next";
7
7
 
8
- void bootCsr(import.meta.glob("./**/*.tsx"), "./[lang]/${dict.appName}/layout.tsx");
8
+ void bootCsr(import.meta.glob("./**/*.tsx"), "./[lang]/${dict.appName}/layout.tsx", "/");
9
9
  `
10
10
  };
11
11
  }
@@ -10,6 +10,7 @@
10
10
  "daisyui": "^5.0.35"
11
11
  },
12
12
  "devDependencies": {
13
+ "@tailwindcss/postcss": "^4.1.7",
13
14
  "@types/react": "18.3.1",
14
15
  "@types/react-dom": "18.3.1",
15
16
  "crypto-browserify": "^3.12.1",
@@ -22,6 +23,9 @@
22
23
  "process": "^0.11.10",
23
24
  "stream-browserify": "^3.0.0",
24
25
  "stream-http": "^3.2.0",
26
+ "tailwind-scrollbar": "4.0.2",
27
+ "tailwindcss-animation-delay": "^2.0.2",
28
+ "tailwindcss-radix": "^4.0.2",
25
29
  "ts-jest": "^29.3.4",
26
30
  "url-polyfill": "^1.1.13",
27
31
  "vite": "^6.3.5",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sourceType": "module",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.125",
4
+ "version": "0.0.127",
5
5
  "bin": {
6
6
  "akan": "cjs/index.js"
7
7
  },
@@ -0,0 +1,9 @@
1
+ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
+ interface Dict {
3
+ appName: string;
4
+ }
5
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
+ filename: string;
7
+ content: string;
8
+ };
9
+ export {};
@@ -1,7 +1,9 @@
1
- import { Workspace } from "@akanjs/devkit";
1
+ import { Exec, Workspace } from "@akanjs/devkit";
2
2
  import { WorkspaceScript } from "./workspace.script";
3
3
  export declare class WorkspaceCommand {
4
4
  workspaceScript: WorkspaceScript;
5
5
  createWorkspace(name: string, app: string, dir: string): Promise<void>;
6
6
  generateMongo(workspace: Workspace): Promise<void>;
7
+ lint(exec: Exec, fix: boolean, workspace: Workspace): Promise<void>;
8
+ lintAll(fix: boolean, workspace: Workspace): Promise<void>;
7
9
  }
@@ -1,6 +1,9 @@
1
- import { type Workspace } from "@akanjs/devkit";
1
+ import { Exec, type Workspace } from "@akanjs/devkit";
2
2
  import { WorkspaceExecutor } from "@akanjs/devkit";
3
3
  export declare class WorkspaceRunner {
4
4
  createWorkspace(repoName: string, appName: string, dirname?: string): Promise<WorkspaceExecutor>;
5
5
  generateMongo(workspace: Workspace): Promise<void>;
6
+ lint(exec: Exec, workspace: Workspace, { fix }?: {
7
+ fix?: boolean;
8
+ }): Promise<void>;
6
9
  }
@@ -1,4 +1,4 @@
1
- import { WorkspaceExecutor } from "@akanjs/devkit";
1
+ import { Exec, Workspace } from "@akanjs/devkit";
2
2
  import { ApplicationScript } from "../application/application.script";
3
3
  import { LibraryScript } from "../library/library.script";
4
4
  export declare class WorkspaceScript {
@@ -6,5 +6,11 @@ export declare class WorkspaceScript {
6
6
  applicationScript: ApplicationScript;
7
7
  libraryScript: LibraryScript;
8
8
  createWorkspace(repoName: string, appName: string, dirname?: string): Promise<void>;
9
- generateMongo(workspace: WorkspaceExecutor): Promise<void>;
9
+ generateMongo(workspace: Workspace): Promise<void>;
10
+ lint(exec: Exec, workspace: Workspace, { fix }?: {
11
+ fix?: boolean;
12
+ }): Promise<void>;
13
+ lintAll(workspace: Workspace, { fix }?: {
14
+ fix?: boolean;
15
+ }): Promise<void>;
10
16
  }