Skip to content

Commit 9d45136

Browse files
authored
Merge pull request #50 from plutov/vue-ui
Migrate to Vue 3
2 parents 8c2e3d7 + 403591d commit 9d45136

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7198
-5623
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ api/pkg/github/tmp/
22
api/pkg/parser/tmp/
33
api/postgres-data/
44
api/uploads/
5-
ui/node_modules
6-
ui/.next/
7-
ui/out/
5+
node_modules/
6+
.next/
7+
ui/dist
88
ui/build
99
ui/npm-debug.log*
1010
ui/yarn-debug.log*

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ You can build and run both API and Postgres with Docker Compose:
276276
docker-compose up -d --build
277277
```
278278

279+
API will be available at `http://localhost:9900`.
280+
279281
Environment variables:
280282

281283
API:
@@ -292,6 +294,8 @@ npm install
292294
npm run dev
293295
```
294296
297+
UI will be available at `http://localhost:5173`.
298+
295299
### Run API locally
296300
297301
Assuming you have Postgres running locally (`docker-compose up -d postgres`), you can run the API with:
@@ -306,7 +310,7 @@ go run main.go
306310
## Tech Stack
307311
308312
- Backend: Go, Postgres
309-
- UI: Next.js, Tailwind CSS
313+
- UI: Vue 3, Tailwind CSS
310314
311315
## Create new Postgres migration
312316

ui/.env.example

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
NEXT_PUBLIC_API_ADDR=http://localhost:9900
2-
IRON_SESSION_SECRET=not_very_secret_replace_me
3-
HTTP_BASIC_AUTH=user:pass
4-
1+
VITE_API_ADDR=http://localhost:9900

ui/.eslintrc.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

ui/.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

ui/.prettierrc.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"semi": false,
3-
"trailingComma": "es5",
4-
"singleQuote": true,
5-
"tabWidth": 2,
6-
"useTabs": false
7-
}
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 100
6+
}

ui/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

ui/eslint.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { globalIgnores } from 'eslint/config'
2+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
3+
import pluginVue from 'eslint-plugin-vue'
4+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
5+
6+
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
7+
// import { configureVueProject } from '@vue/eslint-config-typescript'
8+
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
9+
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
10+
11+
export default defineConfigWithVueTs(
12+
{
13+
name: 'app/files-to-lint',
14+
files: ['**/*.{ts,mts,tsx,vue}'],
15+
},
16+
17+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
18+
19+
pluginVue.configs['flat/essential'],
20+
vueTsConfigs.recommended,
21+
skipFormatting,
22+
)

ui/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Formulosity</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

ui/next-env.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)