diff --git a/.dockerignore b/.dockerignore
index 89f5c3c..4275580 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -6,5 +6,3 @@ README.md
Dockerfile
.dockerignore
docker-compose.yml
-.storybook
-stories
\ No newline at end of file
diff --git a/.env.example b/.env.example
index 87ac666..f8a4358 100644
--- a/.env.example
+++ b/.env.example
@@ -1,6 +1,3 @@
-# Chromatic token
-PROJECT_TOKEN=****************************
-
# Recommended for most uses
DATABASE_URL=****************************
diff --git a/.storybook/main.ts b/.storybook/main.ts
deleted file mode 100644
index 7145bcb..0000000
--- a/.storybook/main.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import type { StorybookConfig } from '@storybook/sveltekit';
-
-const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
- addons: [
- '@storybook/addon-svelte-csf',
- '@chromatic-com/storybook',
- '@storybook/addon-docs',
- '@storybook/addon-a11y',
- '@storybook/addon-vitest'
- ],
- framework: {
- name: '@storybook/sveltekit',
- options: {}
- }
-};
-export default config;
diff --git a/.storybook/preview.ts b/.storybook/preview.ts
deleted file mode 100644
index 9b795cc..0000000
--- a/.storybook/preview.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { Preview } from '@storybook/sveltekit';
-
-const preview: Preview = {
- parameters: {
- controls: {
- matchers: {
- color: /(background|color)$/i,
- date: /Date$/i
- }
- }
- }
-};
-
-export default preview;
diff --git a/eslint.config.js b/eslint.config.js
index 8313140..106456d 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,6 +1,4 @@
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
-import storybook from 'eslint-plugin-storybook';
-
import prettier from 'eslint-config-prettier';
import { fileURLToPath } from 'node:url';
import { includeIgnoreFile } from '@eslint/compat';
diff --git a/package.json b/package.json
index d80c645..4ca43cb 100644
--- a/package.json
+++ b/package.json
@@ -16,26 +16,16 @@
"db:push": "drizzle-kit push",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
- "db:studio": "drizzle-kit studio",
- "storybook": "storybook dev -p 6006",
- "build-storybook": "storybook build",
- "chromatic": "npx chromatic"
+ "db:studio": "drizzle-kit studio"
},
"devDependencies": {
- "@chromatic-com/storybook": "^4.1.1",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.22.0",
"@oslojs/crypto": "^1.0.1",
"@oslojs/encoding": "^1.1.0",
- "@storybook/addon-a11y": "^9.1.8",
- "@storybook/addon-docs": "^9.1.8",
- "@storybook/addon-svelte-csf": "^5.0.8",
- "@storybook/addon-vitest": "^9.1.8",
- "@storybook/sveltekit": "^9.1.8",
"@sveltejs/kit": "^2.22.0",
"@sveltejs/vite-plugin-svelte": "^6.0.0",
"@types/node": "^22",
- "chromatic": "^13.2.0",
"drizzle-kit": "^0.30.2",
"drizzle-orm": "^0.40.0",
"eslint": "^9.22.0",
@@ -46,7 +36,6 @@
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
- "storybook": "^9.1.8",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
diff --git a/src/app.css b/src/app.css
index 97e8a0f..24b2ad7 100644
--- a/src/app.css
+++ b/src/app.css
@@ -12,7 +12,13 @@
}
body {
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ font-family:
+ system-ui,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ sans-serif;
line-height: 1.5;
background-color: #f8f8f8;
color: #333;
diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte
new file mode 100644
index 0000000..646c00f
--- /dev/null
+++ b/src/lib/components/Button.svelte
@@ -0,0 +1,65 @@
+
+
+
+ {@render children?.()}
+
+
+
diff --git a/src/lib/components/ErrorMessage.svelte b/src/lib/components/ErrorMessage.svelte
new file mode 100644
index 0000000..8a3da66
--- /dev/null
+++ b/src/lib/components/ErrorMessage.svelte
@@ -0,0 +1,22 @@
+
+
+{#if message && show}
+
{message}
+{/if}
+
+
diff --git a/src/lib/components/Input.svelte b/src/lib/components/Input.svelte
new file mode 100644
index 0000000..8039eb6
--- /dev/null
+++ b/src/lib/components/Input.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
diff --git a/src/lib/components/UserInfo.svelte b/src/lib/components/UserInfo.svelte
new file mode 100644
index 0000000..8ccc1b7
--- /dev/null
+++ b/src/lib/components/UserInfo.svelte
@@ -0,0 +1,47 @@
+
+
+
+
Hi, {username}!
+ {#if showId}
+
Your user ID is {id}.
+ {/if}
+
+
+
diff --git a/src/lib/index.ts b/src/lib/index.ts
index 856f2b6..8a4deef 100644
--- a/src/lib/index.ts
+++ b/src/lib/index.ts
@@ -1 +1,5 @@
-// place files you want to import through the `$lib` alias in this folder.
+// Reusable UI Components
+export { default as Input } from './components/Input.svelte';
+export { default as Button } from './components/Button.svelte';
+export { default as ErrorMessage } from './components/ErrorMessage.svelte';
+export { default as UserInfo } from './components/UserInfo.svelte';
diff --git a/src/lib/server/db/schema.ts b/src/lib/server/db/schema.ts
index cbb6d1a..0ba1772 100644
--- a/src/lib/server/db/schema.ts
+++ b/src/lib/server/db/schema.ts
@@ -1,4 +1,4 @@
-import { pgTable, serial, integer, text, timestamp } from 'drizzle-orm/pg-core';
+import { pgTable, integer, text, timestamp } from 'drizzle-orm/pg-core';
export const user = pgTable('user', {
id: text('id').primaryKey(),
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index d590632..ed1a83e 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,14 +1,31 @@
-Welcome to Serengo
-Hi, {data.user.username}!
-Your user ID is {data.user.id}.
+
+
Welcome to Serengo
+
-
+
+
+
+
diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte
index 5aa08b6..ea47c0b 100644
--- a/src/routes/login/+page.svelte
+++ b/src/routes/login/+page.svelte
@@ -1,7 +1,7 @@
@@ -10,33 +10,68 @@
Serengo
- {#if form?.message}
- {form.message}
- {/if}
+
+
+
+
diff --git a/src/routes/login/login.css b/src/routes/login/login.css
deleted file mode 100644
index e21bec5..0000000
--- a/src/routes/login/login.css
+++ /dev/null
@@ -1,115 +0,0 @@
-.login-container {
- display: flex;
- flex-direction: column;
- min-height: 100vh;
- padding: 4rem 2rem;
- background-color: #f8f8f8;
- align-items: center;
- justify-content: flex-start;
- max-width: 400px;
- margin: 0 auto;
-}
-
-.login-title {
- font-family: 'Washington', serif;
- font-size: 3.5rem;
- color: #000000;
- margin-bottom: 6rem;
- text-align: center;
- font-weight: normal;
- letter-spacing: -0.02em;
-}
-
-.login-form {
- display: flex;
- flex-direction: column;
- width: 100%;
- gap: 1.5rem;
-}
-
-.input-group {
- display: flex;
- flex-direction: column;
-}
-
-.input-field {
- padding: 1.25rem 1.5rem;
- border: none;
- border-radius: 2rem;
- background-color: #e0e0e0;
- font-size: 1rem;
- color: #333;
- outline: none;
- transition: background-color 0.2s ease;
- height: 3.5rem;
-}
-
-.input-field:focus {
- background-color: #d5d5d5;
-}
-
-.input-field::placeholder {
- color: #888;
-}
-
-.button-group {
- display: flex;
- gap: 1rem;
-}
-
-.login-button,
-.register-button {
- flex: 1;
- padding: 1.25rem 2rem;
- border: none;
- border-radius: 2rem;
- font-size: 1rem;
- font-weight: 500;
- transition: all 0.2s ease;
- cursor: pointer;
- height: 3.5rem;
-}
-
-.login-button {
- background-color: #3a4553;
- color: white;
-}
-
-.login-button:hover {
- background-color: #2d3441;
- transform: translateY(-1px);
-}
-
-.register-button {
- background-color: #3a4553;
- color: white;
-}
-
-.register-button:hover {
- background-color: #2d3441;
- transform: translateY(-1px);
-}
-
-.error-message {
- color: #e53e3e;
- font-size: 0.875rem;
- text-align: center;
- margin-top: 1rem;
- padding: 0.5rem;
-}
-
-/* Mobile responsiveness */
-@media (max-width: 480px) {
- .login-container {
- padding: 3rem 1.5rem;
- }
-
- .login-title {
- font-size: 3rem;
- margin-bottom: 4rem;
- }
-
- .button-group {
- margin-top: 3rem;
- }
-}
diff --git a/src/stories/Button.stories.svelte b/src/stories/Button.stories.svelte
deleted file mode 100644
index 373922a..0000000
--- a/src/stories/Button.stories.svelte
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/stories/Button.svelte b/src/stories/Button.svelte
deleted file mode 100644
index a4abdc6..0000000
--- a/src/stories/Button.svelte
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- {label}
-
diff --git a/src/stories/Configure.mdx b/src/stories/Configure.mdx
deleted file mode 100644
index 7abd269..0000000
--- a/src/stories/Configure.mdx
+++ /dev/null
@@ -1,369 +0,0 @@
-import { Meta } from '@storybook/addon-docs/blocks';
-
-import Github from './assets/github.svg';
-import Discord from './assets/discord.svg';
-import Youtube from './assets/youtube.svg';
-import Tutorials from './assets/tutorials.svg';
-import Styling from './assets/styling.png';
-import Context from './assets/context.png';
-import Assets from './assets/assets.png';
-import Docs from './assets/docs.png';
-import Share from './assets/share.png';
-import FigmaPlugin from './assets/figma-plugin.png';
-import Testing from './assets/testing.png';
-import Accessibility from './assets/accessibility.png';
-import Theming from './assets/theming.png';
-import AddonLibrary from './assets/addon-library.png';
-
-export const RightArrow = () => (
-
-
-
-);
-
-
-
-
-
- # Configure your project
-
- Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
-
-
-
-
-
-
Add styling and CSS
-
Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.
-
Learn more
-
-
-
-
Provide context and mocking
-
Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.
-
Learn more
-
-
-
-
-
Load assets and resources
-
To link static files (like fonts) to your projects and stories, use the
- `staticDirs` configuration option to specify folders to load when
- starting Storybook.
-
Learn more
-
-
-
-
-
-
- # Do more with Storybook
-
- Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
-
-
-
-
-
-
-
-
Autodocs
-
Auto-generate living,
- interactive reference documentation from your components and stories.
-
Learn more
-
-
-
-
Publish to Chromatic
-
Publish your Storybook to review and collaborate with your entire team.
-
Learn more
-
-
-
-
Figma Plugin
-
Embed your stories into Figma to cross-reference the design and live
- implementation in one place.
-
Learn more
-
-
-
-
Testing
-
Use stories to test a component in all its variations, no matter how
- complex.
-
Learn more
-
-
-
-
Accessibility
-
Automatically test your components for a11y issues as you develop.
-
Learn more
-
-
-
-
Theming
-
Theme Storybook's UI to personalize it to your project.
-
Learn more
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Join our contributors building the future of UI development.
-
-
Star on GitHub
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/stories/Header.stories.svelte b/src/stories/Header.stories.svelte
deleted file mode 100644
index 3ea062d..0000000
--- a/src/stories/Header.stories.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/src/stories/Header.svelte b/src/stories/Header.svelte
deleted file mode 100644
index aa5e14a..0000000
--- a/src/stories/Header.svelte
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
diff --git a/src/stories/Login.stories.svelte b/src/stories/Login.stories.svelte
deleted file mode 100644
index 0bf3b9f..0000000
--- a/src/stories/Login.stories.svelte
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
diff --git a/src/stories/Login.svelte b/src/stories/Login.svelte
deleted file mode 100644
index 182f278..0000000
--- a/src/stories/Login.svelte
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
Serengo
-
-
-
- {#if errorMessage}
-
{errorMessage}
- {/if}
-
diff --git a/src/stories/Page.stories.svelte b/src/stories/Page.stories.svelte
deleted file mode 100644
index 4cd9c24..0000000
--- a/src/stories/Page.stories.svelte
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- {
- const canvas = within(canvasElement);
- const loginButton = canvas.getByRole('button', { name: /Log in/i });
- await expect(loginButton).toBeInTheDocument();
- await userEvent.click(loginButton);
- await waitFor(() => expect(loginButton).not.toBeInTheDocument());
-
- const logoutButton = canvas.getByRole('button', { name: /Log out/i });
- await expect(logoutButton).toBeInTheDocument();
- }}
-/>
-
-
diff --git a/src/stories/Page.svelte b/src/stories/Page.svelte
deleted file mode 100644
index c88695c..0000000
--- a/src/stories/Page.svelte
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
- (user = { name: 'Jane Doe' })}
- onLogout={() => (user = undefined)}
- onCreateAccount={() => (user = { name: 'Jane Doe' })}
- />
-
-
- Pages in Storybook
-
- We recommend building UIs with a
-
- component-driven
-
- process starting with atomic components and ending with pages.
-
-
- Render pages with mock data. This makes it easy to build and review page states without
- needing to navigate to them in your app. Here are some handy patterns for managing page data
- in Storybook:
-
-
-
- Use a higher-level connected component. Storybook helps you compose such data from the
- "args" of child component stories
-
-
- Assemble data in the page component from your services. You can mock these services out
- using Storybook.
-
-
-
- Get a guided tutorial on component-driven development at
-
- Storybook tutorials
-
- . Read more in the
- docs
- .
-
-
-
Tip
- Adjust the width of the canvas with the
-
-
-
-
-
- Viewports addon in the toolbar
-
-
-
diff --git a/src/stories/assets/accessibility.png b/src/stories/assets/accessibility.png
deleted file mode 100644
index 6ffe6fe..0000000
Binary files a/src/stories/assets/accessibility.png and /dev/null differ
diff --git a/src/stories/assets/accessibility.svg b/src/stories/assets/accessibility.svg
deleted file mode 100644
index 107e93f..0000000
--- a/src/stories/assets/accessibility.svg
+++ /dev/null
@@ -1 +0,0 @@
-Accessibility
\ No newline at end of file
diff --git a/src/stories/assets/addon-library.png b/src/stories/assets/addon-library.png
deleted file mode 100644
index 95deb38..0000000
Binary files a/src/stories/assets/addon-library.png and /dev/null differ
diff --git a/src/stories/assets/assets.png b/src/stories/assets/assets.png
deleted file mode 100644
index cfba681..0000000
Binary files a/src/stories/assets/assets.png and /dev/null differ
diff --git a/src/stories/assets/avif-test-image.avif b/src/stories/assets/avif-test-image.avif
deleted file mode 100644
index 530709b..0000000
Binary files a/src/stories/assets/avif-test-image.avif and /dev/null differ
diff --git a/src/stories/assets/context.png b/src/stories/assets/context.png
deleted file mode 100644
index e5cd249..0000000
Binary files a/src/stories/assets/context.png and /dev/null differ
diff --git a/src/stories/assets/discord.svg b/src/stories/assets/discord.svg
deleted file mode 100644
index d638958..0000000
--- a/src/stories/assets/discord.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/stories/assets/docs.png b/src/stories/assets/docs.png
deleted file mode 100644
index a749629..0000000
Binary files a/src/stories/assets/docs.png and /dev/null differ
diff --git a/src/stories/assets/figma-plugin.png b/src/stories/assets/figma-plugin.png
deleted file mode 100644
index 8f79b08..0000000
Binary files a/src/stories/assets/figma-plugin.png and /dev/null differ
diff --git a/src/stories/assets/github.svg b/src/stories/assets/github.svg
deleted file mode 100644
index dc51352..0000000
--- a/src/stories/assets/github.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/stories/assets/share.png b/src/stories/assets/share.png
deleted file mode 100644
index 8097a37..0000000
Binary files a/src/stories/assets/share.png and /dev/null differ
diff --git a/src/stories/assets/styling.png b/src/stories/assets/styling.png
deleted file mode 100644
index d341e82..0000000
Binary files a/src/stories/assets/styling.png and /dev/null differ
diff --git a/src/stories/assets/testing.png b/src/stories/assets/testing.png
deleted file mode 100644
index d4ac39a..0000000
Binary files a/src/stories/assets/testing.png and /dev/null differ
diff --git a/src/stories/assets/theming.png b/src/stories/assets/theming.png
deleted file mode 100644
index 1535eb9..0000000
Binary files a/src/stories/assets/theming.png and /dev/null differ
diff --git a/src/stories/assets/tutorials.svg b/src/stories/assets/tutorials.svg
deleted file mode 100644
index b492a9c..0000000
--- a/src/stories/assets/tutorials.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/stories/assets/youtube.svg b/src/stories/assets/youtube.svg
deleted file mode 100644
index a7515d7..0000000
--- a/src/stories/assets/youtube.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/stories/button.css b/src/stories/button.css
deleted file mode 100644
index 4fc38a2..0000000
--- a/src/stories/button.css
+++ /dev/null
@@ -1,30 +0,0 @@
-.storybook-button {
- display: inline-block;
- cursor: pointer;
- border: 0;
- border-radius: 3em;
- font-weight: 700;
- line-height: 1;
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
-}
-.storybook-button--primary {
- background-color: #555ab9;
- color: white;
-}
-.storybook-button--secondary {
- box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
- background-color: transparent;
- color: #333;
-}
-.storybook-button--small {
- padding: 10px 16px;
- font-size: 12px;
-}
-.storybook-button--medium {
- padding: 11px 20px;
- font-size: 14px;
-}
-.storybook-button--large {
- padding: 12px 24px;
- font-size: 16px;
-}
diff --git a/src/stories/header.css b/src/stories/header.css
deleted file mode 100644
index d511c66..0000000
--- a/src/stories/header.css
+++ /dev/null
@@ -1,32 +0,0 @@
-.storybook-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
- padding: 15px 20px;
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
-}
-
-.storybook-header svg {
- display: inline-block;
- vertical-align: top;
-}
-
-.storybook-header h1 {
- display: inline-block;
- vertical-align: top;
- margin: 6px 0 6px 10px;
- font-weight: 700;
- font-size: 20px;
- line-height: 1;
-}
-
-.storybook-header button + button {
- margin-left: 10px;
-}
-
-.storybook-header .welcome {
- margin-right: 10px;
- color: #333;
- font-size: 14px;
-}
diff --git a/src/stories/page.css b/src/stories/page.css
deleted file mode 100644
index 67f2bb2..0000000
--- a/src/stories/page.css
+++ /dev/null
@@ -1,68 +0,0 @@
-.storybook-page {
- margin: 0 auto;
- padding: 48px 20px;
- max-width: 600px;
- color: #333;
- font-size: 14px;
- line-height: 24px;
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
-}
-
-.storybook-page h2 {
- display: inline-block;
- vertical-align: top;
- margin: 0 0 4px;
- font-weight: 700;
- font-size: 32px;
- line-height: 1;
-}
-
-.storybook-page p {
- margin: 1em 0;
-}
-
-.storybook-page a {
- color: inherit;
-}
-
-.storybook-page ul {
- margin: 1em 0;
- padding-left: 30px;
-}
-
-.storybook-page li {
- margin-bottom: 8px;
-}
-
-.storybook-page .tip {
- display: inline-block;
- vertical-align: top;
- margin-right: 10px;
- border-radius: 1em;
- background: #e7fdd8;
- padding: 4px 12px;
- color: #357a14;
- font-weight: 700;
- font-size: 11px;
- line-height: 12px;
-}
-
-.storybook-page .tip-wrapper {
- margin-top: 40px;
- margin-bottom: 40px;
- font-size: 13px;
- line-height: 20px;
-}
-
-.storybook-page .tip-wrapper svg {
- display: inline-block;
- vertical-align: top;
- margin-top: 3px;
- margin-right: 4px;
- width: 12px;
- height: 12px;
-}
-
-.storybook-page .tip-wrapper svg path {
- fill: #1ea7fd;
-}