Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
SnO2WMaN committed Nov 8, 2022
0 parents commit 1932b9c
Show file tree
Hide file tree
Showing 22 changed files with 3,036 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.*-{version,versions}]
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
use flake
34 changes: 34 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"root": true,
"extends": [
"plugin:eslint-comments/recommended",
"next/core-web-vitals"
],
"plugins": [
"unused-imports",
"simple-import-sort",
],
"rules": {
"prefer-spread": 2,
"prefer-template": 2,
"no-useless-rename": [
2
],
"object-shorthand": [
2,
"always"
],
"quote-props": [
2,
"consistent-as-needed"
],
/* unused-imports */
"unused-imports/no-unused-imports": [
2
],
/* simple-import-sort */
"sort-imports": 0,
"simple-import-sort/imports": 2,
"simple-import-sort/exports": 2,
},
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flake.lock linguist-generated=true
pnpm-lock.yaml linguist-generated=true
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.env
.direnv

result
target

# misc
.DS_Store
*.pem

# env
.env*.local

# dependency
node_modules/

# cache
.eslintcache

# log
.pnpm-debug.log

# typescript
*.tsbuildinfo
next-env.d.ts

# Vercel
.vercel

# Next.js
.next
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"editorconfig.editorconfig",
"jnoortheen.nix-ide",
"tamasfe.even-better-toml",
"arrterian.nix-env-selector",
"jkillian.custom-local-formatters",
"mkhl.direnv",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files.exclude": {
"**/.direnv": true,
"**/.next": true,
"**/node_modules": true
},
"nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix",
"typescript.tsdk": "node_modules/typescript/lib",
}
145 changes: 145 additions & 0 deletions flake.lock

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

44 changes: 44 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
corepack.url = "github:SnO2WMaN/corepack-flake";
devshell.url = "github:numtide/devshell";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = with inputs; [
devshell.overlay
corepack.overlays.default
];
};
in {
devShells.default = pkgs.devshell.mkShell {
packages = with pkgs; [
alejandra
treefmt
nodejs-16_x
(mkCorepack {
nodejs = nodejs-16_x;
pm = "pnpm";
})
];
devshell.startup.pnpm_install.text = "pnpm install";
env = [
{
name = "PATH";
prefix = "$PRJ_ROOT/node_modules/.bin";
}
];
};
}
);
}
8 changes: 8 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
pageExtensions: ['page.tsx', 'page.ts'],
images: {},
}
module.exports = nextConfig
42 changes: 42 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "@otomad-database/web",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint",
"typecheck": "tsc --noEmit"
},
"engines": {
"node": "^16"
},
"dependencies": {
"@heroicons/react": "^2.0.13",
"clsx": "^1.2.1",
"ky": "^0.32.2",
"next": "13.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-use": "^17.4.0",
"swr": "^1.3.0"
},
"devDependencies": {
"@tsconfig/node16": "1.0.3",
"@types/node": "18.11.9",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@typescript-eslint/parser": "5.42.1",
"autoprefixer": "10.4.13",
"eslint": "8.27.0",
"eslint-config-next": "13.0.2",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-simple-import-sort": "8.0.0",
"eslint-plugin-unused-imports": "2.0.0",
"postcss": "8.4.18",
"prettier": "^2.7.1",
"tailwindcss": "3.2.2",
"typescript": "4.8.4"
}
}
Loading

0 comments on commit 1932b9c

Please sign in to comment.