create-sonamu 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +365 -2
- package/index.js +632 -0
- package/package.json +30 -20
- package/template/src/README.md +274 -0
- package/template/src/packages/api/.swcrc +18 -0
- package/template/src/packages/api/custom-sequencer.ts +23 -0
- package/template/src/packages/api/database/docker-compose.yml +19 -0
- package/template/src/packages/api/database/fixtures/init.sh +15 -0
- package/template/src/packages/api/database/scripts/dump.sh +62 -0
- package/template/src/packages/api/database/scripts/seed.sh +60 -0
- package/template/src/packages/api/package.json +55 -0
- package/template/src/packages/api/package.json.bak +55 -0
- package/template/src/packages/api/src/application/.gitkeep +1 -0
- package/template/src/packages/api/src/i18n/en.ts +59 -0
- package/template/src/packages/api/src/i18n/ko.ts +57 -0
- package/template/src/packages/api/src/index.ts +6 -0
- package/template/src/packages/api/src/migrations/.gitkeep +1 -0
- package/template/src/packages/api/src/sonamu.config.ts +162 -0
- package/template/src/packages/api/src/testing/fixture.ts +6 -0
- package/template/src/packages/api/src/testing/global.ts +6 -0
- package/template/src/packages/api/src/testing/setup-mocks.ts +44 -0
- package/template/src/packages/api/src/typings/fastify.d.ts +7 -0
- package/template/src/packages/api/src/typings/sonamu.d.ts +19 -0
- package/template/src/packages/api/src/utils/subset-loaders.ts +11 -0
- package/template/src/packages/api/tsconfig.json +60 -0
- package/template/src/packages/api/tsconfig.schemas.json +5 -0
- package/template/src/packages/api/tsconfig.types.json +5 -0
- package/template/src/packages/api/vitest.config.ts +36 -0
- package/template/src/packages/web/.sonamu.env +2 -0
- package/template/src/{web → packages/web}/index.html +3 -3
- package/template/src/packages/web/package.json +49 -0
- package/template/src/packages/web/package.json.bak +49 -0
- package/template/src/packages/web/src/App.tsx +17 -0
- package/template/src/packages/web/src/admin-common/ApiLogViewer.tsx +285 -0
- package/template/src/packages/web/src/admin-common/CommonModal.tsx +91 -0
- package/template/src/packages/web/src/contexts/sonamu-provider.tsx +41 -0
- package/template/src/packages/web/src/entry-client.tsx +72 -0
- package/template/src/packages/web/src/entry-server.generated.tsx +58 -0
- package/template/src/packages/web/src/i18n/en.ts +63 -0
- package/template/src/packages/web/src/i18n/ko.ts +61 -0
- package/template/src/packages/web/src/routeTree.gen.ts +27 -0
- package/template/src/packages/web/src/routes/__root.tsx +44 -0
- package/template/src/packages/web/src/routes/index.tsx +14 -0
- package/template/src/packages/web/src/styles/tailwind.css +5 -0
- package/template/src/packages/web/src/vite-env.d.ts +2 -0
- package/template/src/packages/web/tailwind.config.ts +8 -0
- package/template/src/{web → packages/web}/tsconfig.json +5 -3
- package/template/src/packages/web/vite.config.ts +51 -0
- package/template/src/api/README.md +0 -3
- package/template/src/api/database/docker-compose.yml +0 -17
- package/template/src/api/package.json +0 -39
- package/template/src/api/sonamu.config.json +0 -11
- package/template/src/api/src/configs/db.ts +0 -25
- package/template/src/api/src/index.ts +0 -36
- package/template/src/api/src/testing/bootstrap.ts +0 -20
- package/template/src/api/src/testing/fixture.ts +0 -18
- package/template/src/api/src/testing/global.ts +0 -7
- package/template/src/api/src/typings/sonamu.d.ts +0 -5
- package/template/src/api/tsconfig.json +0 -115
- package/template/src/api/vite.config.mts +0 -15
- package/template/src/web/package.json +0 -40
- package/template/src/web/public/vite.svg +0 -1
- package/template/src/web/src/App.css +0 -34
- package/template/src/web/src/App.tsx +0 -15
- package/template/src/web/src/assets/react.svg +0 -1
- package/template/src/web/src/index.css +0 -76
- package/template/src/web/src/main.tsx +0 -30
- package/template/src/web/src/pages/index.tsx +0 -11
- package/template/src/web/src/vite-env.d.ts +0 -1
- package/template/src/web/vite.config.ts +0 -20
- /package/template/src/{web/src/services → packages/api/database/dumps}/.gitkeep +0 -0
- /package/template/src/{api/database/scripts/init.sql → packages/web/src/services/.gitkeep} +0 -0
- /package/template/src/{web → packages/web}/tsconfig.node.json +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
a {
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #646cff;
|
|
19
|
-
text-decoration: inherit;
|
|
20
|
-
}
|
|
21
|
-
a:hover {
|
|
22
|
-
color: #535bf2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
place-items: center;
|
|
29
|
-
min-width: 320px;
|
|
30
|
-
min-height: 100vh;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
font-size: 3.2em;
|
|
35
|
-
line-height: 1.1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
button {
|
|
39
|
-
border-radius: 8px;
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
padding: 0.6em 1.2em;
|
|
42
|
-
font-size: 1em;
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
font-family: inherit;
|
|
45
|
-
background-color: #1a1a1a;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition: border-color 0.25s;
|
|
48
|
-
}
|
|
49
|
-
button:hover {
|
|
50
|
-
border-color: #646cff;
|
|
51
|
-
}
|
|
52
|
-
button:focus,
|
|
53
|
-
button:focus-visible {
|
|
54
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media (prefers-color-scheme: light) {
|
|
58
|
-
:root {
|
|
59
|
-
color: #213547;
|
|
60
|
-
background-color: #ffffff;
|
|
61
|
-
}
|
|
62
|
-
a:hover {
|
|
63
|
-
color: #747bff;
|
|
64
|
-
}
|
|
65
|
-
button {
|
|
66
|
-
background-color: #f9f9f9;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.card {
|
|
71
|
-
padding: 2em;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.description {
|
|
75
|
-
color: #888;
|
|
76
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ReactDOM from "react-dom/client";
|
|
3
|
-
import App from "./App";
|
|
4
|
-
import { loadDynamicRoutes } from "@sonamu-kit/react-sui";
|
|
5
|
-
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|
6
|
-
import { SWRConfig } from "swr";
|
|
7
|
-
import PublicIndexPage from "./pages";
|
|
8
|
-
import { swrFetcher } from "./services/sonamu.shared";
|
|
9
|
-
import "semantic-ui-css/semantic.min.css";
|
|
10
|
-
import "./index.css";
|
|
11
|
-
|
|
12
|
-
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
|
13
|
-
<SWRConfig
|
|
14
|
-
value={{
|
|
15
|
-
errorRetryInterval: 3000,
|
|
16
|
-
errorRetryCount: 3,
|
|
17
|
-
fetcher: swrFetcher,
|
|
18
|
-
revalidateOnFocus: true,
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
<BrowserRouter>
|
|
22
|
-
<Routes>
|
|
23
|
-
<Route path="/" element={<App />}>
|
|
24
|
-
{loadDynamicRoutes(import.meta.glob("./pages/**/*.tsx"))}
|
|
25
|
-
</Route>
|
|
26
|
-
<Route path="*" element={<div>404 Page Not Found</div>} />
|
|
27
|
-
</Routes>
|
|
28
|
-
</BrowserRouter>
|
|
29
|
-
</SWRConfig>,
|
|
30
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import react from "@vitejs/plugin-react";
|
|
3
|
-
import path from "path";
|
|
4
|
-
|
|
5
|
-
// https://vitejs.dev/config/
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [react()],
|
|
8
|
-
resolve: {
|
|
9
|
-
alias: {
|
|
10
|
-
src: path.resolve(__dirname, "./src"),
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
server: {
|
|
14
|
-
host: "0.0.0.0",
|
|
15
|
-
port: 16001,
|
|
16
|
-
proxy: {
|
|
17
|
-
"/api": "http://0.0.0.0:19000",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|