refactor: migrate to pnpm monorepo with Payload CMS backend and Astro frontend to support scalable website development and AI-assisted workflows
This commit is contained in:
5
apps/frontend/.astro/settings.json
Normal file
5
apps/frontend/.astro/settings.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"_variables": {
|
||||
"lastUpdateCheck": 1758741038303
|
||||
}
|
||||
}
|
||||
1
apps/frontend/.astro/types.d.ts
vendored
Normal file
1
apps/frontend/.astro/types.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="astro/client" />
|
||||
3
apps/frontend/README.md
Normal file
3
apps/frontend/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Frontend (Astro)
|
||||
|
||||
This package hosts the Astro application for enchun.tw. Use `pnpm dev` to run the site locally once dependencies are installed at the workspace root.
|
||||
12
apps/frontend/astro.config.mjs
Normal file
12
apps/frontend/astro.config.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import cloudflare from '@astrojs/cloudflare';
|
||||
import tailwind from '@astrojs/tailwind';
|
||||
|
||||
export default defineConfig({
|
||||
output: 'server',
|
||||
adapter: cloudflare(),
|
||||
integrations: [tailwind()],
|
||||
typescript: {
|
||||
strict: true
|
||||
}
|
||||
});
|
||||
23
apps/frontend/package.json
Normal file
23
apps/frontend/package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@enchun/frontend",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"check": "astro check"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/cloudflare": "^9.0.0",
|
||||
"@astrojs/tailwind": "^5.0.0",
|
||||
"astro": "^4.0.0",
|
||||
"better-auth": "^1.3.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.0",
|
||||
"tailwindcss": "^3.4.0",
|
||||
"typescript": "^5.4.0"
|
||||
}
|
||||
}
|
||||
6
apps/frontend/postcss.config.cjs
Normal file
6
apps/frontend/postcss.config.cjs
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
};
|
||||
2
apps/frontend/src/env.d.ts
vendored
Normal file
2
apps/frontend/src/env.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
/// <reference types="astro/client" />
|
||||
16
apps/frontend/src/pages/index.astro
Normal file
16
apps/frontend/src/pages/index.astro
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
import '../styles/tailwind.css';
|
||||
---
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>enchun.tw</title>
|
||||
</head>
|
||||
<body class="bg-surface text-text">
|
||||
<main class="mx-auto flex min-h-screen max-w-4xl flex-col items-center justify-center gap-6 px-4 text-center">
|
||||
<h1 class="text-4xl font-semibold text-primary">enchun.tw migration scaffold</h1>
|
||||
<p class="text-lg text-secondary">Astro SSR frontend is ready for development.</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
3
apps/frontend/src/styles/tailwind.css
Normal file
3
apps/frontend/src/styles/tailwind.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
9
apps/frontend/tailwind.config.cjs
Normal file
9
apps/frontend/tailwind.config.cjs
Normal file
@@ -0,0 +1,9 @@
|
||||
const sharedConfig = require('@enchun/shared/tailwind-config');
|
||||
|
||||
module.exports = {
|
||||
...sharedConfig,
|
||||
content: [
|
||||
'./src/**/*.{astro,tsx,ts,jsx,js,mdx}',
|
||||
...sharedConfig.content
|
||||
]
|
||||
};
|
||||
9
apps/frontend/tsconfig.json
Normal file
9
apps/frontend/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@shared/*": ["../packages/shared/src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user