T005-T006
This commit is contained in:
@@ -1,3 +1,13 @@
|
|||||||
|
# GlowTrack Web (SvelteKit)
|
||||||
|
|
||||||
|
Minimal scaffold created for T005.
|
||||||
|
|
||||||
|
Scripts:
|
||||||
|
- pnpm dev — start dev server
|
||||||
|
- pnpm build — build static site (adapter-static)
|
||||||
|
- pnpm preview — preview built site
|
||||||
|
|
||||||
|
After T006/T007, Tailwind and tests will be wired.
|
||||||
# GlowTrack Web App
|
# GlowTrack Web App
|
||||||
|
|
||||||
Placeholder for SvelteKit PWA app. See specs in `specs/001-glowtrack-a-mood/`.
|
Placeholder for SvelteKit PWA app. See specs in `specs/001-glowtrack-a-mood/`.
|
||||||
|
|||||||
31
apps/web/package.json
Normal file
31
apps/web/package.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"name": "@glowtrack/web",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"description": "GlowTrack SvelteKit web app (adapter-static)",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite dev",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||||
|
"test": "echo \"No unit tests yet (see T007)\" && exit 0",
|
||||||
|
"test:e2e": "echo \"No e2e tests yet (see T007, T012–T015)\" && exit 0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"svelte": "^4.2.18"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@sveltejs/adapter-static": "^3.0.0",
|
||||||
|
"@sveltejs/kit": "^2.5.0",
|
||||||
|
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
||||||
|
"autoprefixer": "^10.4.20",
|
||||||
|
"postcss": "^8.4.47",
|
||||||
|
"svelte-preprocess": "^5.1.4",
|
||||||
|
"tailwindcss": "^3.4.14",
|
||||||
|
"@tailwindcss/forms": "^0.5.9",
|
||||||
|
"svelte": "^4.2.18",
|
||||||
|
"typescript": "^5.5.4",
|
||||||
|
"vite": "^5.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
apps/web/postcss.config.cjs
Normal file
6
apps/web/postcss.config.cjs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
42
apps/web/src/app.css
Normal file
42
apps/web/src/app.css
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
:root {
|
||||||
|
--bg: #0b0b10;
|
||||||
|
--fg: #e5e7eb;
|
||||||
|
--muted: #9ca3af;
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body, #svelte {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
a { color: inherit; }
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 960px;
|
||||||
|
padding: 1rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(7, 1fr);
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tile {
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #111827;
|
||||||
|
box-shadow: 0 0 10px rgba(56, 189, 248, 0.15) inset;
|
||||||
|
}
|
||||||
|
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
11
apps/web/src/app.d.ts
vendored
Normal file
11
apps/web/src/app.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// See https://kit.svelte.dev/docs/types#app
|
||||||
|
// for information about these interfaces
|
||||||
|
declare global {
|
||||||
|
namespace App {
|
||||||
|
// interface Error {}
|
||||||
|
// interface Locals {}
|
||||||
|
// interface PageData {}
|
||||||
|
// interface Platform {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export {};
|
||||||
12
apps/web/src/app.html
Normal file
12
apps/web/src/app.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="/favicon.png" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
%sveltekit.head%
|
||||||
|
</head>
|
||||||
|
<body data-sveltekit-preload-data="hover">
|
||||||
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
14
apps/web/src/routes/+layout.svelte
Normal file
14
apps/web/src/routes/+layout.svelte
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import '../app.css';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<link rel="manifest" href="/manifest.webmanifest" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#0b0b10" />
|
||||||
|
<title>GlowTrack</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<div class="min-h-dvh bg-zinc-950 text-zinc-100">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
13
apps/web/src/routes/+page.svelte
Normal file
13
apps/web/src/routes/+page.svelte
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
const days = Array.from({ length: 35 });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<h1>GlowTrack</h1>
|
||||||
|
<p class="muted">Mood & Habit wellbeing grid — SvelteKit scaffold.</p>
|
||||||
|
<section class="grid" aria-label="demo grid">
|
||||||
|
{#each days as _, i}
|
||||||
|
<div class="tile" aria-label={`day ${i + 1}`} />
|
||||||
|
{/each}
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
0
apps/web/static/favicon.png
Normal file
0
apps/web/static/favicon.png
Normal file
20
apps/web/static/manifest.webmanifest
Normal file
20
apps/web/static/manifest.webmanifest
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "GlowTrack",
|
||||||
|
"short_name": "GlowTrack",
|
||||||
|
"start_url": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#0b0b10",
|
||||||
|
"theme_color": "#0b0b10",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/icon-192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icon-512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
18
apps/web/svelte.config.js
Normal file
18
apps/web/svelte.config.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import adapter from '@sveltejs/adapter-static';
|
||||||
|
import preprocess from 'svelte-preprocess';
|
||||||
|
|
||||||
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
|
const config = {
|
||||||
|
preprocess: preprocess({ postcss: true }),
|
||||||
|
kit: {
|
||||||
|
adapter: adapter({
|
||||||
|
fallback: '200.html'
|
||||||
|
}),
|
||||||
|
// Service worker wiring comes in T008
|
||||||
|
paths: {
|
||||||
|
// supports GitHub Pages-like hosting later; keep default for now
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
10
apps/web/tailwind.config.cjs
Normal file
10
apps/web/tailwind.config.cjs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
module.exports = {
|
||||||
|
content: [
|
||||||
|
'./src/**/*.{html,js,svelte,ts}',
|
||||||
|
],
|
||||||
|
theme: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [require('@tailwindcss/forms')],
|
||||||
|
};
|
||||||
19
apps/web/tsconfig.json
Normal file
19
apps/web/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "ES2022",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"types": ["svelte", "vite/client", "@sveltejs/kit"],
|
||||||
|
"paths": {
|
||||||
|
"$lib": ["src/lib"],
|
||||||
|
"$lib/*": ["src/lib/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["src/**/*", "vite.config.ts", "svelte.config.js"],
|
||||||
|
"exclude": ["node_modules", "dist", "build", ".svelte-kit"]
|
||||||
|
}
|
||||||
6
apps/web/vite.config.ts
Normal file
6
apps/web/vite.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [sveltekit()],
|
||||||
|
});
|
||||||
2534
pnpm-lock.yaml
generated
Normal file
2534
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -42,7 +42,7 @@ Paths below are absolute to this repo.
|
|||||||
- Add dev deps: eslint, eslint-config-prettier, prettier, typescript, svelte-check
|
- Add dev deps: eslint, eslint-config-prettier, prettier, typescript, svelte-check
|
||||||
- Dependencies: T003
|
- Dependencies: T003
|
||||||
|
|
||||||
- [ ] T005 Scaffold SvelteKit PWA (adapter-static)
|
- [X] T005 Scaffold SvelteKit PWA (adapter-static)
|
||||||
- In /home/jawz/Development/Projects/GlowTrack/apps/web create a SvelteKit app:
|
- In /home/jawz/Development/Projects/GlowTrack/apps/web create a SvelteKit app:
|
||||||
- package.json, svelte.config.js (adapter-static), vite.config.ts, tsconfig.json
|
- package.json, svelte.config.js (adapter-static), vite.config.ts, tsconfig.json
|
||||||
- src/app.d.ts, src/app.css, src/routes/+layout.svelte, src/routes/+page.svelte (hello grid)
|
- src/app.d.ts, src/app.css, src/routes/+layout.svelte, src/routes/+page.svelte (hello grid)
|
||||||
@@ -50,7 +50,7 @@ Paths below are absolute to this repo.
|
|||||||
- Add scripts: dev, build, preview, test, test:e2e, check
|
- Add scripts: dev, build, preview, test, test:e2e, check
|
||||||
- Dependencies: T003, T004
|
- Dependencies: T003, T004
|
||||||
|
|
||||||
- [ ] T006 Tailwind CSS setup
|
- [X] T006 Tailwind CSS setup
|
||||||
- apps/web: tailwind.config.cjs, postcss.config.cjs; integrate @tailwindcss/forms
|
- apps/web: tailwind.config.cjs, postcss.config.cjs; integrate @tailwindcss/forms
|
||||||
- Wire Tailwind into src/app.css and +layout.svelte
|
- Wire Tailwind into src/app.css and +layout.svelte
|
||||||
- Dependencies: T005
|
- Dependencies: T005
|
||||||
|
|||||||
Reference in New Issue
Block a user