Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moved migrations to pgtle extension. add www app #13

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import withMarkdoc from '@markdoc/next.js'
import withSearch from './src/markdoc/search.mjs'
import withMarkdoc from '@markdoc/next.js';
import withSearch from './src/markdoc/search.mjs';

const isProd = process.env.NODE_ENV === 'production';

/** @type {import('next').NextConfig} */
const nextConfig = {
assetPrefix: isProd ? 'https://docs.elwood.software' : undefined,
pageExtensions: ['js', 'jsx', 'md', 'ts', 'tsx'],
}
};

export default withSearch(
withMarkdoc({ schemaPath: './src/markdoc' })(nextConfig),
)
withMarkdoc({schemaPath: './src/markdoc'})(nextConfig),
);
9 changes: 9 additions & 0 deletions apps/www/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ['@elwood/eslint-config/next.js'],
parser: '@typescript-eslint/parser',
ignorePatterns: ['next.config.mjs'],
parserOptions: {
project: true,
},
};
5 changes: 5 additions & 0 deletions apps/www/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
36 changes: 36 additions & 0 deletions apps/www/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/** @type {import('next').NextConfig} */
export default {
reactStrictMode: true,
transpilePackages: [
'@elwood/common',
'@elwood/react',
'@elwood/js',
'@elwood/ui',
],
webpack(config) {
config.resolve.alias.canvas = false;
return config;
},
async rewrites() {
return [
{
source: '/db/latest.json',
destination:
'https://github.com/elwood-software/db/raw/main/versions/latest.json',
},
{
source: '/db/v:version',
destination:
'https://github.com/elwood-software/db/raw/main/versions/:version',
},
{
source: '/docs/',
destination: 'https://docs.elwood.software/docs/',
},
{
source: '/docs/:path*/',
destination: 'https://docs.elwood.software/docs/:path*/',
},
];
},
};
37 changes: 37 additions & 0 deletions apps/www/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@elwood/apps-www",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "next build",
"clean": "rm -rf .next",
"dev": "next dev -p 3001",
"lint": "next lint",
"type-check": "tsc --noEmit",
"start": "next start"
},
"dependencies": {
"@elwood/common": "workspace:*",
"@elwood/ui": "workspace:*",
"@supabase/ssr": "^0.3.0",
"autoprefixer": "^10.4.19",
"geist": "^1.3.0",
"next": "^14.2.3",
"postcss": "^8.4.38",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-use": "^17.5.0",
"tailwindcss": "^3.4.3",
"zod": "^3.23.8"
},
"devDependencies": {
"@elwood/eslint-config": "workspace:*",
"@elwood/typescript-config": "workspace:*",
"@next/eslint-plugin-next": "^14.2.3",
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"prettier-plugin-tailwindcss": "^0.5.14",
"typescript": "^5.4.5"
}
}
1 change: 1 addition & 0 deletions apps/www/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@elwood/ui/postcss.config.js');
Binary file added apps/www/public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-167x167.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/favicon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/favicon-196x196.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/public/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/www/src/app/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions apps/www/src/app/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
28 changes: 28 additions & 0 deletions apps/www/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type {PropsWithChildren} from 'react';
import {type Metadata} from 'next';
import {cookies} from 'next/headers';
import {ElwoodThemeProvider} from '@elwood/ui';

import './global.css';
import '@elwood/ui/style.css';

export const metadata: Metadata = {
title: 'Elwood',
};

export default function RootLayout(props: PropsWithChildren): JSX.Element {
const theme = cookies().get('system-theme')?.value ?? '';
const validThemes = ['light', 'dark'];
const themeClassName = validThemes.includes(theme) ? theme : '';

return (
<html lang="en" suppressHydrationWarning>
<body
className={`overflow-hidden w-screen h-screen text-foreground bg-background ${themeClassName}`}
data-color-mode={themeClassName}
data-color-server-theme={theme}>
<ElwoodThemeProvider>{props.children}</ElwoodThemeProvider>
</body>
</html>
);
}
28 changes: 28 additions & 0 deletions apps/www/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {Logo, Button} from '@elwood/ui';

export default function Page() {
return (
<div className="w-screen h-screen flex flex-col items-center justify-center">
<h1 className="size-1/4">
<Logo className="size-full fill-current" />
<span className="sr-only">Elwood</span>
</h1>

<h2 className="mt-12 font-bold text-2xl">
Open source Dropbox alternative
</h2>

<div className="flex items-center space-x-3 mt-6">
<Button variant="outline" href="/docs">
Docs
</Button>
<Button variant="outline" href="https://github.elwood.software">
Github
</Button>
<Button variant="outline" href="https://discord.elwood.software">
Discord
</Button>
</div>
</div>
);
}
19 changes: 19 additions & 0 deletions apps/www/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const {theme, plugins} = require('@elwood/ui/tailwind.config.js');
const {resolve, dirname} = require('path');

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
resolve(
dirname(require.resolve('@elwood/react')),
'./**/*.{js,ts,jsx,tsx,mdx}',
),
resolve(
dirname(require.resolve('@elwood/ui')),
'./**/*.{js,ts,jsx,tsx,mdx}',
),
'./src/**/*.{js,ts,jsx,tsx,mdx}',
],
theme,
plugins: [...plugins],
};
16 changes: 16 additions & 0 deletions apps/www/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"exclude": ["node_modules", "next.config.mjs"],
"extends": "@elwood/typescript-config/nextjs.json",
"compilerOptions": {
"outDir": "dist",
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src", "next-env.d.ts", ".next/types/**/*.ts"]
}
9 changes: 9 additions & 0 deletions apps/www/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": ["//"],
"globalEnv": [],
"pipeline": {
"build": {
"outputs": [".next/**", "!.next/cache/**"]
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"prettier-plugin-tailwindcss": "^0.5.14",
"turbo": "latest"
},
"packageManager": "[email protected].0",
"packageManager": "[email protected].1",
"engines": {
"node": ">=20"
},
Expand Down
64 changes: 64 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions supabase/migrations/20240218234006_schema.sql

This file was deleted.

Loading
Loading