-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
3,298 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
extends: [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
], | ||
rules: { | ||
"@typescript-eslint/array-type": "off", | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"warn", | ||
{ | ||
prefer: "type-imports", | ||
fixStyle: "inline-type-imports", | ||
}, | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
argsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/require-await": "off", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ | ||
checksVoidReturn: { | ||
attributes: false, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; | ||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful | ||
* for Docker builds. | ||
*/ | ||
await import("./src/env.js"); | ||
|
||
/** @type {import("next").NextConfig} */ | ||
const config = {}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@mist/web", | ||
"version": "0.1.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"lint": "next lint && biome check ./src", | ||
"lint:fix": "next lint && biome check --apply ./src", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"@mist/database": "workspace:*", | ||
"@t3-oss/env-nextjs": "^0.10.1", | ||
"dotenv": "^16.4.5", | ||
"next": "^14.2.4", | ||
"next-safe-action": "^7.1.3", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"server-only": "^0.0.1", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@types/eslint": "^8.56.10", | ||
"@types/node": "^20.14.10", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.1.1", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"eslint": "^8.57.0", | ||
"eslint-config-next": "^14.2.4", | ||
"postcss": "^8.4.39", | ||
"tailwindcss": "^3.4.3", | ||
"typescript": "^5.5.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const config = { | ||
plugins: { | ||
tailwindcss: {}, | ||
}, | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import "~/styles/globals.css"; | ||
|
||
import { Inter } from "next/font/google"; | ||
|
||
const interFont = Inter({ subsets: ["latin"], variable: "--font-inter" }); | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ children: React.ReactNode }>) { | ||
return ( | ||
<html lang="en" className={interFont.variable}> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default async function Home() { | ||
return <div>Hello world!</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as dotenv from "dotenv"; | ||
|
||
import { createEnv } from "@t3-oss/env-nextjs"; | ||
import { z } from "zod"; | ||
|
||
// Explicitly load the .env file from the root of the monorepo | ||
dotenv.config({ path: [".env", "../../.env"] }); | ||
|
||
export const env = createEnv({ | ||
server: { | ||
DATABASE_URL: z.string().url(), | ||
NODE_ENV: z | ||
.enum(["development", "test", "production"]) | ||
.default("development"), | ||
}, | ||
client: {}, | ||
runtimeEnv: { | ||
DATABASE_URL: process.env.DATABASE_URL, | ||
NODE_ENV: process.env.NODE_ENV, | ||
}, | ||
skipValidation: !!process.env.SKIP_ENV_VALIDATION || !!process.env.CI, | ||
emptyStringAsUndefined: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { PrismaClient } from "@mist/database"; | ||
import { env } from "~/env"; | ||
|
||
const createPrismaClient = () => | ||
new PrismaClient({ | ||
log: | ||
env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"], | ||
}); | ||
|
||
const globalForPrisma = globalThis as unknown as { | ||
prisma: ReturnType<typeof createPrismaClient> | undefined; | ||
}; | ||
|
||
export const db = globalForPrisma.prisma ?? createPrismaClient(); | ||
|
||
if (env.NODE_ENV !== "production") globalForPrisma.prisma = db; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { createSafeActionClient } from "next-safe-action"; | ||
|
||
export const actionClient = createSafeActionClient(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { type Config } from "tailwindcss"; | ||
import { fontFamily } from "tailwindcss/defaultTheme"; | ||
|
||
export default { | ||
content: ["./src/**/*.tsx"], | ||
theme: { | ||
extend: { | ||
fontFamily: { | ||
sans: ["var(--font-inter)", ...fontFamily.sans], | ||
}, | ||
}, | ||
}, | ||
plugins: [], | ||
} satisfies Config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Base Options: */ | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"target": "es2022", | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"moduleDetection": "force", | ||
"isolatedModules": true, | ||
|
||
/* Strictness */ | ||
"strict": true, | ||
"noUncheckedIndexedAccess": true, | ||
"checkJs": true, | ||
|
||
/* Bundled projects */ | ||
"lib": ["dom", "dom.iterable", "ES2022"], | ||
"noEmit": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"jsx": "preserve", | ||
"plugins": [{ "name": "next" }], | ||
"incremental": true, | ||
|
||
/* Path Aliases */ | ||
"baseUrl": ".", | ||
"paths": { | ||
"~/*": ["./src/*"] | ||
} | ||
}, | ||
"include": [ | ||
".eslintrc.cjs", | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"**/*.cjs", | ||
"**/*.js", | ||
".next/types/**/*.ts" | ||
], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.