@appinit/cli 1.1.0 → 1.3.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/LICENSE +68 -0
- package/README.md +27 -95
- package/dist/index.d.ts +371 -2
- package/dist/index.js +3795 -24
- package/dist/templates/backend-express/.appinit-generate/project/.appinit/project.json +6 -0
- package/dist/templates/backend-express/.appinit-generate/project/.appinit/template.json +6 -0
- package/dist/templates/backend-express/.appinit-generate/project/.env.example +4 -0
- package/dist/templates/backend-express/.appinit-generate/project/.husky/pre-commit +1 -0
- package/dist/templates/backend-express/.appinit-generate/project/.prettierignore +3 -0
- package/dist/templates/backend-express/.appinit-generate/project/.prettierrc +28 -0
- package/dist/templates/backend-express/.appinit-generate/project/.vscode/settings.json +6 -0
- package/dist/templates/backend-express/.appinit-generate/project/Dockerfile +14 -0
- package/dist/templates/backend-express/.appinit-generate/project/README.md +26 -0
- package/dist/templates/backend-express/.appinit-generate/project/eslint.config.js +76 -0
- package/dist/templates/backend-express/.appinit-generate/project/nodemon.json +8 -0
- package/dist/templates/backend-express/.appinit-generate/project/package.json +69 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/__tests__/health.test.ts +19 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/__tests__/validation.test.ts +36 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/app.ts +72 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/config/defaults.ts +5 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/config/dev.ts +3 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/config/env.ts +62 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/config/prod.ts +3 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/config/test.ts +3 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/errors/app-error.ts +20 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/errors/not-found.ts +16 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/middleware/error-handler.ts +73 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/middleware/http-logger.ts +5 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/middleware/validate.ts +17 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/routes/health.ts +13 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/routes/users.ts +12 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/schema/create-user.schema.ts +8 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/server.ts +54 -0
- package/dist/templates/backend-express/.appinit-generate/project/src/utils/logger.ts +21 -0
- package/dist/templates/backend-express/.appinit-generate/project/tsconfig.json +30 -0
- package/dist/templates/backend-express/.appinit-generate/project/vitest.config.ts +15 -0
- package/dist/templates/backend-express/.appinit-preview/project/.appinit/project.json +6 -0
- package/dist/templates/backend-express/.appinit-preview/project/.appinit/template.json +6 -0
- package/dist/templates/backend-express/.appinit-preview/project/.env.example +4 -0
- package/dist/templates/backend-express/.appinit-preview/project/.husky/pre-commit +1 -0
- package/dist/templates/backend-express/.appinit-preview/project/.prettierignore +3 -0
- package/dist/templates/backend-express/.appinit-preview/project/.prettierrc +28 -0
- package/dist/templates/backend-express/.appinit-preview/project/.vscode/settings.json +6 -0
- package/dist/templates/backend-express/.appinit-preview/project/Dockerfile +14 -0
- package/dist/templates/backend-express/.appinit-preview/project/README.md +26 -0
- package/dist/templates/backend-express/.appinit-preview/project/eslint.config.js +76 -0
- package/dist/templates/backend-express/.appinit-preview/project/nodemon.json +8 -0
- package/dist/templates/backend-express/.appinit-preview/project/package.json +69 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/__tests__/health.test.ts +19 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/__tests__/validation.test.ts +36 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/app.ts +72 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/config/defaults.ts +5 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/config/dev.ts +3 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/config/env.ts +62 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/config/prod.ts +3 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/config/test.ts +3 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/errors/app-error.ts +20 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/errors/not-found.ts +16 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/middleware/error-handler.ts +73 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/middleware/http-logger.ts +5 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/middleware/validate.ts +17 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/routes/health.ts +13 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/routes/users.ts +12 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/schema/create-user.schema.ts +8 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/server.ts +54 -0
- package/dist/templates/backend-express/.appinit-preview/project/src/utils/logger.ts +21 -0
- package/dist/templates/backend-express/.appinit-preview/project/tsconfig.json +30 -0
- package/dist/templates/backend-express/.appinit-preview/project/vitest.config.ts +15 -0
- package/dist/templates/backend-express/README.md +107 -0
- package/dist/templates/backend-express/appinit.template.json +25 -0
- package/dist/templates/backend-express/docs/README.md +11 -0
- package/dist/templates/backend-express/package.json +5 -0
- package/dist/templates/backend-express/template/.env.example +4 -0
- package/dist/templates/backend-express/template/.husky/pre-commit +1 -0
- package/dist/templates/backend-express/template/.prettierignore +3 -0
- package/dist/templates/backend-express/template/.prettierrc +28 -0
- package/dist/templates/backend-express/template/.vscode/settings.json +6 -0
- package/dist/templates/backend-express/template/Dockerfile +14 -0
- package/dist/templates/backend-express/template/README.md__tmpl +26 -0
- package/dist/templates/backend-express/template/eslint.config.js +76 -0
- package/dist/templates/backend-express/template/nodemon.json +8 -0
- package/dist/templates/backend-express/template/package.json__tmpl +69 -0
- package/dist/templates/backend-express/template/src/__tests__/health.test.ts +19 -0
- package/dist/templates/backend-express/template/src/__tests__/validation.test.ts +36 -0
- package/dist/templates/backend-express/template/src/app.ts +72 -0
- package/dist/templates/backend-express/template/src/config/defaults.ts +5 -0
- package/dist/templates/backend-express/template/src/config/dev.ts +3 -0
- package/dist/templates/backend-express/template/src/config/env.ts +62 -0
- package/dist/templates/backend-express/template/src/config/prod.ts +3 -0
- package/dist/templates/backend-express/template/src/config/test.ts +3 -0
- package/dist/templates/backend-express/template/src/errors/app-error.ts +20 -0
- package/dist/templates/backend-express/template/src/errors/not-found.ts +16 -0
- package/dist/templates/backend-express/template/src/middleware/error-handler.ts +73 -0
- package/dist/templates/backend-express/template/src/middleware/http-logger.ts +5 -0
- package/dist/templates/backend-express/template/src/middleware/validate.ts +17 -0
- package/dist/templates/backend-express/template/src/routes/health.ts +13 -0
- package/dist/templates/backend-express/template/src/routes/users.ts +12 -0
- package/dist/templates/backend-express/template/src/schema/create-user.schema.ts +8 -0
- package/dist/templates/backend-express/template/src/server.ts +54 -0
- package/dist/templates/backend-express/template/src/utils/logger.ts +21 -0
- package/dist/templates/backend-express/template/tsconfig.json +30 -0
- package/dist/templates/backend-express/template/vitest.config.ts +15 -0
- package/dist/templates/backend-express/template.config.ts +36 -0
- package/dist/templates/backend-express/variables/defaults.json +7 -0
- package/dist/templates/backend-express/variables/defaults.ts +4 -0
- package/dist/templates/backend-express/variables/schema.json +22 -0
- package/dist/templates/backend-express/variables/schema.ts +11 -0
- package/dist/templates/backend-express/variables/transform.ts +6 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/.appinit/project.json +6 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/.appinit/template.json +6 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/README.md +26 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/nodemon.json +8 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/package-lock.json +3245 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/package.json +24 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/src/app.ts +13 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/src/server.ts +15 -0
- package/dist/templates/backend-fastify/.appinit-generate/project/tsconfig.json +30 -0
- package/dist/templates/backend-fastify/README.md +27 -0
- package/dist/templates/backend-fastify/appinit.template.json +25 -0
- package/dist/templates/backend-fastify/docs/README.md +12 -0
- package/dist/templates/backend-fastify/package.json +5 -0
- package/dist/templates/backend-fastify/template/README.md__tmpl +26 -0
- package/dist/templates/backend-fastify/template/nodemon.json +8 -0
- package/dist/templates/backend-fastify/template/package.json__tmpl +24 -0
- package/dist/templates/backend-fastify/template/src/app.ts +13 -0
- package/dist/templates/backend-fastify/template/src/server.ts +15 -0
- package/dist/templates/backend-fastify/template/tsconfig.json +30 -0
- package/dist/templates/backend-fastify/template.config.ts +32 -0
- package/dist/templates/backend-fastify/variables/defaults.json +4 -0
- package/dist/templates/backend-fastify/variables/defaults.ts +3 -0
- package/dist/templates/backend-fastify/variables/schema.json +7 -0
- package/dist/templates/backend-fastify/variables/schema.ts +1 -0
- package/dist/templates/backend-fastify/variables/transform.ts +3 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/.appinit/project.json +6 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/.appinit/template.json +6 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/README.md +33 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/app/favicon.ico +0 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/app/globals.css +42 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/app/layout.tsx +33 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/app/page.module.css +141 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/app/page.tsx +67 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/next-env.d.ts +6 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/next.config.ts +8 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/package.json +25 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/public/file.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/public/globe.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/public/next.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/public/vercel.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/public/window.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-generate/project/tsconfig.json +34 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/.appinit/project.json +6 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/.appinit/template.json +6 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/README.md +33 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/app/favicon.ico +0 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/app/globals.css +42 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/app/layout.tsx +33 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/app/page.module.css +141 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/app/page.tsx +67 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/next-env.d.ts +6 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/next.config.ts +8 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/package.json +25 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/public/file.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/public/globe.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/public/next.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/public/vercel.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/public/window.svg +1 -0
- package/dist/templates/frontend-nextjs/.appinit-preview/project/tsconfig.json +34 -0
- package/dist/templates/frontend-nextjs/README.md +27 -0
- package/dist/templates/frontend-nextjs/appinit.template.json +25 -0
- package/dist/templates/frontend-nextjs/docs/README.md +12 -0
- package/dist/templates/frontend-nextjs/package.json +5 -0
- package/dist/templates/frontend-nextjs/template/README.md__tmpl +33 -0
- package/dist/templates/frontend-nextjs/template/app/favicon.ico +0 -0
- package/dist/templates/frontend-nextjs/template/app/globals.css +42 -0
- package/dist/templates/frontend-nextjs/template/app/layout.tsx +33 -0
- package/dist/templates/frontend-nextjs/template/app/page.module.css +141 -0
- package/dist/templates/frontend-nextjs/template/app/page.tsx +67 -0
- package/dist/templates/frontend-nextjs/template/next-env.d.ts +6 -0
- package/dist/templates/frontend-nextjs/template/next.config.ts +8 -0
- package/dist/templates/frontend-nextjs/template/package.json__tmpl +25 -0
- package/dist/templates/frontend-nextjs/template/public/file.svg +1 -0
- package/dist/templates/frontend-nextjs/template/public/globe.svg +1 -0
- package/dist/templates/frontend-nextjs/template/public/next.svg +1 -0
- package/dist/templates/frontend-nextjs/template/public/vercel.svg +1 -0
- package/dist/templates/frontend-nextjs/template/public/window.svg +1 -0
- package/dist/templates/frontend-nextjs/template/tsconfig.json +34 -0
- package/dist/templates/frontend-nextjs/template.config.ts +28 -0
- package/dist/templates/frontend-nextjs/variables/defaults.json +6 -0
- package/dist/templates/frontend-nextjs/variables/defaults.ts +4 -0
- package/dist/templates/frontend-nextjs/variables/schema.json +22 -0
- package/dist/templates/frontend-nextjs/variables/schema.ts +7 -0
- package/dist/templates/frontend-nextjs/variables/transform.ts +3 -0
- package/dist/templates/frontend-react/.appinit-generate/project/.appinit/project.json +6 -0
- package/dist/templates/frontend-react/.appinit-generate/project/.appinit/template.json +6 -0
- package/dist/templates/frontend-react/.appinit-generate/project/README.md +14 -0
- package/dist/templates/frontend-react/.appinit-generate/project/index.html +12 -0
- package/dist/templates/frontend-react/.appinit-generate/project/package.json +26 -0
- package/dist/templates/frontend-react/.appinit-generate/project/public/vite.svg +30 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/App.tsx +16 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/assets/react.svg +1 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/index.css +9 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/main.tsx +10 -0
- package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.app.json +31 -0
- package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.json +7 -0
- package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.node.json +26 -0
- package/dist/templates/frontend-react/.appinit-generate/project/vite.config.ts +16 -0
- package/dist/templates/frontend-react/appinit.template.json +26 -0
- package/dist/templates/frontend-react/docs/README.md +12 -0
- package/dist/templates/frontend-react/hooks/afterRender.ts +3 -0
- package/dist/templates/frontend-react/hooks/afterWrite.ts +3 -0
- package/dist/templates/frontend-react/hooks/beforeRender.ts +3 -0
- package/dist/templates/frontend-react/hooks/beforeWrite.ts +3 -0
- package/dist/templates/frontend-react/package.json +16 -0
- package/dist/templates/frontend-react/template/.env.example__tmpl +1 -0
- package/dist/templates/frontend-react/template/README.md__tmpl +14 -0
- package/dist/templates/frontend-react/template/_gitignore +41 -0
- package/dist/templates/frontend-react/template/index.html__tmpl +12 -0
- package/dist/templates/frontend-react/template/package.json__tmpl +26 -0
- package/dist/templates/frontend-react/template/public/vite.svg +30 -0
- package/dist/templates/frontend-react/template/src/App.tsx__tmpl +16 -0
- package/dist/templates/frontend-react/template/src/assets/react.svg +1 -0
- package/dist/templates/frontend-react/template/src/index.css__tmpl +9 -0
- package/dist/templates/frontend-react/template/src/main.tsx__tmpl +10 -0
- package/dist/templates/frontend-react/template/tsconfig.app.json__tmpl +31 -0
- package/dist/templates/frontend-react/template/tsconfig.json__tmpl +7 -0
- package/dist/templates/frontend-react/template/tsconfig.node.json__tmpl +26 -0
- package/dist/templates/frontend-react/template/vite.config.ts__tmpl +16 -0
- package/dist/templates/frontend-react/template.config.ts +26 -0
- package/dist/templates/frontend-react/template.meta.json +10 -0
- package/dist/templates/frontend-react/variables/defaults.json +6 -0
- package/dist/templates/frontend-react/variables/defaults.ts +6 -0
- package/dist/templates/frontend-react/variables/schema.json +15 -0
- package/dist/templates/frontend-react/variables/schema.ts +17 -0
- package/dist/templates/frontend-react/variables/transform.ts +10 -0
- package/dist/templates/frontend-vue/README.md +27 -0
- package/dist/templates/frontend-vue/appinit.template.json +25 -0
- package/dist/templates/frontend-vue/docs/README.md +12 -0
- package/dist/templates/frontend-vue/package.json +5 -0
- package/dist/templates/frontend-vue/template/README.md__tmpl +31 -0
- package/dist/templates/frontend-vue/template/index.html +13 -0
- package/dist/templates/frontend-vue/template/package.json__tmpl +25 -0
- package/dist/templates/frontend-vue/template/public/vite.svg +1 -0
- package/dist/templates/frontend-vue/template/src/App.vue +30 -0
- package/dist/templates/frontend-vue/template/src/assets/vue.svg +1 -0
- package/dist/templates/frontend-vue/template/src/components/HelloWorld.vue +42 -0
- package/dist/templates/frontend-vue/template/src/main.ts +6 -0
- package/dist/templates/frontend-vue/template/src/style.css +79 -0
- package/dist/templates/frontend-vue/template/tsconfig.app.json +16 -0
- package/dist/templates/frontend-vue/template/tsconfig.json +7 -0
- package/dist/templates/frontend-vue/template/tsconfig.node.json +26 -0
- package/dist/templates/frontend-vue/template/vite.config.ts +7 -0
- package/dist/templates/frontend-vue/template.config.ts +32 -0
- package/dist/templates/frontend-vue/variables/defaults.json +6 -0
- package/dist/templates/frontend-vue/variables/defaults.ts +3 -0
- package/dist/templates/frontend-vue/variables/schema.json +22 -0
- package/dist/templates/frontend-vue/variables/schema.ts +1 -0
- package/dist/templates/frontend-vue/variables/transform.ts +3 -0
- package/package.json +40 -29
- package/bin/appinit.js +0 -15
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{ projectName }}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "nodemon src/server.ts",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/server.js",
|
|
10
|
+
"test": "vitest"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"fastify": "^5.6.2",
|
|
14
|
+
"ts-node": "^10.9.2"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "^25.0.3",
|
|
18
|
+
"morgan": "^1.10.1",
|
|
19
|
+
"nodemon": "^3.1.11",
|
|
20
|
+
"tsx": "^4.21.0",
|
|
21
|
+
"typescript": "^5.9.3",
|
|
22
|
+
"vitest": "^1.x"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { fastify } from "./app";
|
|
2
|
+
|
|
3
|
+
const PORT = Number(process.env.PORT) || 3000;
|
|
4
|
+
/**
|
|
5
|
+
* Run the server!
|
|
6
|
+
*/
|
|
7
|
+
const start = async () => {
|
|
8
|
+
try {
|
|
9
|
+
await fastify.listen({ port: PORT, host: "0.0.0.0" });
|
|
10
|
+
} catch (err) {
|
|
11
|
+
fastify.log.error(err);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
start();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Language & runtime */
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
|
|
8
|
+
/* Project structure */
|
|
9
|
+
"rootDir": "src",
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
|
|
12
|
+
/* Interop & correctness */
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"allowSyntheticDefaultImports": true,
|
|
15
|
+
|
|
16
|
+
/* Safety */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"forceConsistentCasingInFileNames": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noEmitOnError": true,
|
|
21
|
+
|
|
22
|
+
/* DX & production debugging */
|
|
23
|
+
"sourceMap": true,
|
|
24
|
+
|
|
25
|
+
/* Node environment */
|
|
26
|
+
"types": ["node", "vitest/globals"]
|
|
27
|
+
},
|
|
28
|
+
"include": ["src"],
|
|
29
|
+
"exclude": ["node_modules", "dist", "__tests__"]
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# 🛠️ AppInit Template Source
|
|
2
|
+
|
|
3
|
+
This directory contains your scaffold blueprints. AppInit 1.0 supports two processing modes defined in your `appinit.config.json`.
|
|
4
|
+
|
|
5
|
+
## ⚙️ Engine: {{engine}}
|
|
6
|
+
|
|
7
|
+
### 1️⃣ If engine: 'liquid'
|
|
8
|
+
|
|
9
|
+
Use LiquidJS syntax for complex logic, loops, and filters.
|
|
10
|
+
|
|
11
|
+
- **Interpolation**: `{{ projectName }}`
|
|
12
|
+
- **Conditionals**: `{% if useTypeScript %} ... {% endif %}`
|
|
13
|
+
|
|
14
|
+
### 2️⃣ If engine: 'none'
|
|
15
|
+
|
|
16
|
+
Use AppInit's high-performance static interpolation.
|
|
17
|
+
|
|
18
|
+
- **Syntax**: `%%projectName%%`
|
|
19
|
+
- **Note**: Logic (if/else) is not supported in 'none' mode. Use this for maximum speed and simple variable replacement.
|
|
20
|
+
|
|
21
|
+
## 📂 Processing Rules
|
|
22
|
+
|
|
23
|
+
- **.\_tmpl**: Only files with this suffix are scanned for interpolation.
|
|
24
|
+
- **Static**: All other files are copied directly without overhead.
|
|
25
|
+
|
|
26
|
+
> [!TIP]
|
|
27
|
+
> Use the `appinit doctor` command to verify your variable mappings before publishing.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "backend.fastify.basic",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"kind": "project",
|
|
6
|
+
"atsVersion": "1.0",
|
|
7
|
+
"name": "Fastify Backend",
|
|
8
|
+
"description": "TypeScript backend starter using Fastify.",
|
|
9
|
+
"category": "backend",
|
|
10
|
+
"language": "typescript",
|
|
11
|
+
"packageName": "@appinit/template-backend-fastify",
|
|
12
|
+
"renderer": {
|
|
13
|
+
"engine": "liquid"
|
|
14
|
+
},
|
|
15
|
+
"paths": {
|
|
16
|
+
"template": "template",
|
|
17
|
+
"variables": "variables"
|
|
18
|
+
},
|
|
19
|
+
"tags": [
|
|
20
|
+
"backend",
|
|
21
|
+
"api",
|
|
22
|
+
"fastify",
|
|
23
|
+
"typescript"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# backend-fastify Template
|
|
2
|
+
|
|
3
|
+
This is a **backend AppInit template**.
|
|
4
|
+
|
|
5
|
+
## What you should add
|
|
6
|
+
|
|
7
|
+
- Files inside /template
|
|
8
|
+
- Variables in /variables
|
|
9
|
+
- Optional hooks in /hooks
|
|
10
|
+
|
|
11
|
+
This scaffold does NOT include framework code.
|
|
12
|
+
You are expected to add it.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ⚛️ backend-fastify
|
|
2
|
+
|
|
3
|
+
This project was generated using **AppInit 1.0**.
|
|
4
|
+
|
|
5
|
+
## 🚀 Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
pnpm dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## 🛠️ Stack Configuration
|
|
13
|
+
|
|
14
|
+
- **Framework**: React 18+ (Vite)
|
|
15
|
+
- **Engine Used**: %%engine%%
|
|
16
|
+
- **Generated At**: %%timestamp%%
|
|
17
|
+
|
|
18
|
+
## 📂 Project Structure
|
|
19
|
+
|
|
20
|
+
- `src/`: Your React components and logic.
|
|
21
|
+
- `public/`: Static assets (images, icons).
|
|
22
|
+
- `tailwind.config.js`: Styling configuration.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
_Built with speed using the AppInit Scaffolding Engine._
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{ projectName }}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "nodemon src/server.ts",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/server.js",
|
|
10
|
+
"test": "vitest"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"fastify": "^5.6.2",
|
|
14
|
+
"ts-node": "^10.9.2"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "^25.0.3",
|
|
18
|
+
"morgan": "^1.10.1",
|
|
19
|
+
"nodemon": "^3.1.11",
|
|
20
|
+
"tsx": "^4.21.0",
|
|
21
|
+
"typescript": "^5.9.3",
|
|
22
|
+
"vitest": "^1.x"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { fastify } from "./app";
|
|
2
|
+
|
|
3
|
+
const PORT = Number(process.env.PORT) || 3000;
|
|
4
|
+
/**
|
|
5
|
+
* Run the server!
|
|
6
|
+
*/
|
|
7
|
+
const start = async () => {
|
|
8
|
+
try {
|
|
9
|
+
await fastify.listen({ port: PORT, host: "0.0.0.0" });
|
|
10
|
+
} catch (err) {
|
|
11
|
+
fastify.log.error(err);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
start();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Language & runtime */
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
|
|
8
|
+
/* Project structure */
|
|
9
|
+
"rootDir": "src",
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
|
|
12
|
+
/* Interop & correctness */
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"allowSyntheticDefaultImports": true,
|
|
15
|
+
|
|
16
|
+
/* Safety */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"forceConsistentCasingInFileNames": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noEmitOnError": true,
|
|
21
|
+
|
|
22
|
+
/* DX & production debugging */
|
|
23
|
+
"sourceMap": true,
|
|
24
|
+
|
|
25
|
+
/* Node environment */
|
|
26
|
+
"types": ["node", "vitest/globals"]
|
|
27
|
+
},
|
|
28
|
+
"include": ["src"],
|
|
29
|
+
"exclude": ["node_modules", "dist", "__tests__"]
|
|
30
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const config = {
|
|
2
|
+
// Canonical template identity
|
|
3
|
+
id: "backend.fastify.basic",
|
|
4
|
+
version: "0.1.0",
|
|
5
|
+
|
|
6
|
+
// ATS contract
|
|
7
|
+
atsVersion: "1.0",
|
|
8
|
+
appinitSpec: "1.0",
|
|
9
|
+
|
|
10
|
+
// Classification
|
|
11
|
+
category: "backend",
|
|
12
|
+
|
|
13
|
+
// Rendering
|
|
14
|
+
renderer: {
|
|
15
|
+
engine: "liquid",
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// Output
|
|
19
|
+
output: {
|
|
20
|
+
dir: ".",
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// Metadata
|
|
24
|
+
name: "backend-fastify",
|
|
25
|
+
description: "Backend Fastify template",
|
|
26
|
+
|
|
27
|
+
tags: ["backend", "api", "fastify"],
|
|
28
|
+
|
|
29
|
+
author: {
|
|
30
|
+
name: "AppInit",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const schema = {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ⚛️ frontend-nextjs
|
|
2
|
+
|
|
3
|
+
This project was generated using **AppInit 1.0**.
|
|
4
|
+
|
|
5
|
+
## 🚀 Quick Start
|
|
6
|
+
|
|
7
|
+
First, run the development server:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run dev
|
|
11
|
+
# or
|
|
12
|
+
yarn dev
|
|
13
|
+
# or
|
|
14
|
+
pnpm dev
|
|
15
|
+
# or
|
|
16
|
+
bun dev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 🛠️ Stack Configuration
|
|
20
|
+
|
|
21
|
+
- **Framework**: React 18+ (Vite)
|
|
22
|
+
- **Engine Used**:
|
|
23
|
+
- **Generated At**:
|
|
24
|
+
|
|
25
|
+
## 📂 Project Structure
|
|
26
|
+
|
|
27
|
+
- `src/`: Your React components and logic.
|
|
28
|
+
- `public/`: Static assets (images, icons).
|
|
29
|
+
- `tailwind.config.js`: Styling configuration.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
_Built with speed using the AppInit Scaffolding Engine._
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--background: #ffffff;
|
|
3
|
+
--foreground: #171717;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@media (prefers-color-scheme: dark) {
|
|
7
|
+
:root {
|
|
8
|
+
--background: #0a0a0a;
|
|
9
|
+
--foreground: #ededed;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html,
|
|
14
|
+
body {
|
|
15
|
+
max-width: 100vw;
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
color: var(--foreground);
|
|
21
|
+
background: var(--background);
|
|
22
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
23
|
+
-webkit-font-smoothing: antialiased;
|
|
24
|
+
-moz-osx-font-smoothing: grayscale;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
* {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
padding: 0;
|
|
30
|
+
margin: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a {
|
|
34
|
+
color: inherit;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (prefers-color-scheme: dark) {
|
|
39
|
+
html {
|
|
40
|
+
color-scheme: dark;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import { Geist, Geist_Mono } from "next/font/google";
|
|
3
|
+
|
|
4
|
+
import "./globals.css";
|
|
5
|
+
|
|
6
|
+
const geistSans = Geist({
|
|
7
|
+
variable: "--font-geist-sans",
|
|
8
|
+
subsets: ["latin"],
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const geistMono = Geist_Mono({
|
|
12
|
+
variable: "--font-geist-mono",
|
|
13
|
+
subsets: ["latin"],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const metadata: Metadata = {
|
|
17
|
+
title: "Create Next App",
|
|
18
|
+
description: "Generated by create next app",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default function RootLayout({
|
|
22
|
+
children,
|
|
23
|
+
}: Readonly<{
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}>) {
|
|
26
|
+
return (
|
|
27
|
+
<html lang="en">
|
|
28
|
+
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
|
29
|
+
{children}
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
.page {
|
|
2
|
+
--background: #fafafa;
|
|
3
|
+
--foreground: #fff;
|
|
4
|
+
|
|
5
|
+
--text-primary: #000;
|
|
6
|
+
--text-secondary: #666;
|
|
7
|
+
|
|
8
|
+
--button-primary-hover: #383838;
|
|
9
|
+
--button-secondary-hover: #f2f2f2;
|
|
10
|
+
--button-secondary-border: #ebebeb;
|
|
11
|
+
|
|
12
|
+
display: flex;
|
|
13
|
+
min-height: 100vh;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
font-family: var(--font-geist-sans);
|
|
17
|
+
background-color: var(--background);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.main {
|
|
21
|
+
display: flex;
|
|
22
|
+
min-height: 100vh;
|
|
23
|
+
width: 100%;
|
|
24
|
+
max-width: 800px;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
background-color: var(--foreground);
|
|
29
|
+
padding: 120px 60px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.intro {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
text-align: left;
|
|
37
|
+
gap: 24px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.intro h1 {
|
|
41
|
+
max-width: 320px;
|
|
42
|
+
font-size: 40px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 48px;
|
|
45
|
+
letter-spacing: -2.4px;
|
|
46
|
+
text-wrap: balance;
|
|
47
|
+
color: var(--text-primary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.intro p {
|
|
51
|
+
max-width: 440px;
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
line-height: 32px;
|
|
54
|
+
text-wrap: balance;
|
|
55
|
+
color: var(--text-secondary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.intro a {
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
color: var(--text-primary);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ctas {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: row;
|
|
66
|
+
width: 100%;
|
|
67
|
+
max-width: 440px;
|
|
68
|
+
gap: 16px;
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ctas a {
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
height: 40px;
|
|
77
|
+
padding: 0 16px;
|
|
78
|
+
border-radius: 128px;
|
|
79
|
+
border: 1px solid transparent;
|
|
80
|
+
transition: 0.2s;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
width: fit-content;
|
|
83
|
+
font-weight: 500;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
a.primary {
|
|
87
|
+
background: var(--text-primary);
|
|
88
|
+
color: var(--background);
|
|
89
|
+
gap: 8px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
a.secondary {
|
|
93
|
+
border-color: var(--button-secondary-border);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Enable hover only on non-touch devices */
|
|
97
|
+
@media (hover: hover) and (pointer: fine) {
|
|
98
|
+
a.primary:hover {
|
|
99
|
+
background: var(--button-primary-hover);
|
|
100
|
+
border-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
a.secondary:hover {
|
|
104
|
+
background: var(--button-secondary-hover);
|
|
105
|
+
border-color: transparent;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: 600px) {
|
|
110
|
+
.main {
|
|
111
|
+
padding: 48px 24px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.intro {
|
|
115
|
+
gap: 16px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.intro h1 {
|
|
119
|
+
font-size: 32px;
|
|
120
|
+
line-height: 40px;
|
|
121
|
+
letter-spacing: -1.92px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@media (prefers-color-scheme: dark) {
|
|
126
|
+
.logo {
|
|
127
|
+
filter: invert();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.page {
|
|
131
|
+
--background: #000;
|
|
132
|
+
--foreground: #000;
|
|
133
|
+
|
|
134
|
+
--text-primary: #ededed;
|
|
135
|
+
--text-secondary: #999;
|
|
136
|
+
|
|
137
|
+
--button-primary-hover: #ccc;
|
|
138
|
+
--button-secondary-hover: #1a1a1a;
|
|
139
|
+
--button-secondary-border: #1a1a1a;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Image from "next/image";
|
|
2
|
+
|
|
3
|
+
import styles from "./page.module.css";
|
|
4
|
+
|
|
5
|
+
export default function Home() {
|
|
6
|
+
return (
|
|
7
|
+
<div className={styles.page}>
|
|
8
|
+
<main className={styles.main}>
|
|
9
|
+
<Image
|
|
10
|
+
className={styles.logo}
|
|
11
|
+
src="/next.svg"
|
|
12
|
+
alt="Next.js logo"
|
|
13
|
+
width={100}
|
|
14
|
+
height={20}
|
|
15
|
+
priority
|
|
16
|
+
/>
|
|
17
|
+
<div className={styles.intro}>
|
|
18
|
+
<h1>To get started, edit the page.tsx file.</h1>
|
|
19
|
+
<p>
|
|
20
|
+
Looking for a starting point or more instructions? Head over to{" "}
|
|
21
|
+
<a
|
|
22
|
+
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
|
23
|
+
target="_blank"
|
|
24
|
+
rel="noopener noreferrer"
|
|
25
|
+
>
|
|
26
|
+
Templates
|
|
27
|
+
</a>{" "}
|
|
28
|
+
or the{" "}
|
|
29
|
+
<a
|
|
30
|
+
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
|
31
|
+
target="_blank"
|
|
32
|
+
rel="noopener noreferrer"
|
|
33
|
+
>
|
|
34
|
+
Learning
|
|
35
|
+
</a>{" "}
|
|
36
|
+
center.
|
|
37
|
+
</p>
|
|
38
|
+
</div>
|
|
39
|
+
<div className={styles.ctas}>
|
|
40
|
+
<a
|
|
41
|
+
className={styles.primary}
|
|
42
|
+
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
|
43
|
+
target="_blank"
|
|
44
|
+
rel="noopener noreferrer"
|
|
45
|
+
>
|
|
46
|
+
<Image
|
|
47
|
+
className={styles.logo}
|
|
48
|
+
src="/vercel.svg"
|
|
49
|
+
alt="Vercel logomark"
|
|
50
|
+
width={16}
|
|
51
|
+
height={16}
|
|
52
|
+
/>
|
|
53
|
+
Deploy Now
|
|
54
|
+
</a>
|
|
55
|
+
<a
|
|
56
|
+
className={styles.secondary}
|
|
57
|
+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
|
58
|
+
target="_blank"
|
|
59
|
+
rel="noopener noreferrer"
|
|
60
|
+
>
|
|
61
|
+
Documentation
|
|
62
|
+
</a>
|
|
63
|
+
</div>
|
|
64
|
+
</main>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
}
|