-
Notifications
You must be signed in to change notification settings - Fork 1
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
Rewrite with sidebase #41
Open
DaeunYoon
wants to merge
74
commits into
main
Choose a base branch
from
rewrite-with-sidebase
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 62 commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
beae65f
cloned sidebase
f97de23
cloned sidebase
1632096
created button component
b4a0bdd
moved nuxt3 to scaffold
60d4cc1
updated classes to tailwind
d8981ad
update class name
22ddbd8
added bottom line
9e6282b
added margin
047b9f5
bottom line show up on all the pages
7bae5e7
replaced url space to dash
84416ae
removed bottom line
dbad8b8
added resolver for inkline and tidy up the code
b47d3a7
fixed import
a8ee7a9
changed to useHead
842afe8
test
b2c27ea
fix lint and name page
713e404
updated typo
9d14a62
updated readme
cf12794
addressed changes
cf14de1
removed redundant code
4284e78
removed example code
2887dac
removed unsused code
14b3d85
suggestion endpoint
c3b71e1
removed unused code
c5c1609
adjust with sidebase server update
822746e
updated css
273657a
removed unused icon
c758448
components test
d78dfc5
production mode directory updated
89a7f3a
small css change
bc27635
for git test
3e9be1c
moved to antdesign comp
242d408
moved useHead to pages
fea6944
added footer
80bb626
small css changes
3653657
updated meta data
673097d
small css changes
d3d5308
tags updated
46904c4
removed example entity
6a43fa2
removed unused prop
ff764ed
updated searchbar test
c2ca3e2
removed search function
560162b
removed unused package
6ff3e38
updated share grid test
675ae9f
removed inlknie resolver
3f6a586
implemented company entity
2390cf5
update company entity id
65d9f5a
useClipboard
b9954de
update test to failing case
fe72626
move mlms to db
bede831
fetch from db
82d5283
install vueuse/core
54273af
save suggestions to db
7359ee8
updated test
007774b
fixed lint
73112a2
updated test
db24a94
updates readme
c3e36f0
Update README.md
DaeunYoon 1e15a2d
updated suggestion entity
1f89ff8
Merge branch 'rewrite-with-sidebase' of https://github.com/BracketJoh…
a78c543
changed folder name library to data
8d8b3fe
seachbar loading state
3b36ab0
addressing the change request
5c038a3
updated searchbar loading state
9a29c78
remove vue-router auto import
d1df978
add button hover
fdca077
removed auto-imports/components
f5319a1
adressing the changes
c42e2cf
updated lint
b1ef39d
updated load fail message
3959664
addressed changes
10ca52c
updated sanp
50a18ba
addressing the changes
6575bc8
fixed eslint
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[**.{json,js,ts,y{a,}ml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 4 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,26 @@ | ||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 16.14.2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14.2 | ||
- run: npm ci | ||
working-directory: ./app | ||
- run: npm run build | ||
working-directory: ./app | ||
- run: npm run lint | ||
working-directory: ./app | ||
- run: npm run test | ||
working-directory: ./app |
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 |
---|---|---|
@@ -1,30 +1,78 @@ | ||
# mac | ||
# Logs and databases # | ||
###################### | ||
*.log | ||
*.sql | ||
*.sqlite | ||
/logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.vscode | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# helmsman generated tmp folder | ||
.helmsman-tmp | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# dependencies | ||
node_modules | ||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# eslint | ||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# logs | ||
npm-debug.log | ||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# Nuxt build | ||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
.output | ||
|
||
# Nuxt generate | ||
dist | ||
|
||
# VS Code | ||
.editorconfig | ||
# Histoire output | ||
.histoire | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
# IDE / Editor | ||
.idea | ||
|
||
# python | ||
__pycache__ | ||
Pipfile | ||
.coverage | ||
# Service worker | ||
sw.* | ||
|
||
# suggestions | ||
suggestions | ||
suggestions.log | ||
# Vim swap files | ||
*.swp |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"vue.volar" | ||
] | ||
} |
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,22 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"[vue]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[js]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[ts]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"eslint.validate": [ | ||
"javascript", | ||
"typescript", | ||
"vue" | ||
] | ||
} |
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 | ||||
---|---|---|---|---|---|---|
@@ -1,8 +1,10 @@ | ||||||
![isthisanmlm](./.github/webpage.png) | ||||||
|
||||||
# is-this-an-mlm | ||||||
|
||||||
Website to determine whether a company is an mlm. It currently runs [here](https://isthisanmlm.com) and is referenced by multiple websites, videos and people as a help to determine whether a company is a multilevel marketing (MLM) company. | ||||||
This website determines whether a company is an mlm. It currently runs [here](https://isthisanmlm.com) and is referenced by multiple websites, videos and people as a help to determine whether a company is a multilevel marketing (MLM) company. | ||||||
|
||||||
Multilevel marketing companies often prey on their members. I decided to create this site as a help for the community in order to tackle these harmful schemes. It is developed out in the open to keep it open and transparent. | ||||||
`Multilevel marketing companies` often prey on their members. I decided to create this site as a help for the community in order to tackle these harmful schemes. It is developed out in the open to keep it open and transparent. | ||||||
|
||||||
The main source of MLMs is the `antiMLM` reddit community and the visitors of the page themselves (as they can submit companies by themselves). | ||||||
|
||||||
|
@@ -15,4 +17,6 @@ Install `docker` and `docker-compose`. Then run: | |||||
|
||||||
## Development | ||||||
|
||||||
For development instructions, please have a look at the `README.md`s in each individual service directory. | ||||||
This website is build with [SideBase](https://github.com/sidestream-tech/sidebase) and following the basic stacks of SideBase. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Please user all lower case sidebase everywhere |
||||||
|
||||||
For development instructions, please have a look at the [`README.md`](/app/README.md). |
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 @@ | ||
node_modules | ||
npm-debug* | ||
.nuxt | ||
dist | ||
tests | ||
.histoire | ||
.output |
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,6 @@ | ||
dist | ||
public | ||
|
||
# ignore generate imports | ||
auto-imports.d.ts | ||
components.d.ts |
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,26 @@ | ||
{ | ||
"extends": "@antfu/vue", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"./server/**/*.ts" | ||
], | ||
"rules": { | ||
"no-console": "off", | ||
"no-undef": "error" | ||
} | ||
} | ||
], | ||
"rules": { | ||
"curly": [ | ||
"error", | ||
"all" | ||
], | ||
"brace-style": "off", | ||
"@typescript-eslint/brace-style": [ | ||
"error", | ||
"1tbs" | ||
], | ||
"no-unused-vars": "error" | ||
} | ||
} |
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,8 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Check types | ||
npm run lint:types | ||
|
||
# Lint and fix staged files (e.g.: fix the import order of a file and still commit it afterwards) | ||
npx lint-staged |
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,4 @@ | ||
# Required to install nuxt3 at the moment, see https://v3.nuxtjs.org/getting-started/installation#new-project (select `pnpm`) | ||
shamefully-hoist=true | ||
# Required to enforce the engine versions we provide in the `package.json` | ||
engine-strict=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.14.2 |
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 @@ | ||
# see https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact | ||
ARG NODE_VERSION=node:16.14.2 | ||
|
||
FROM $NODE_VERSION AS dependency-base | ||
|
||
# create destination directory | ||
RUN mkdir -p /app | ||
WORKDIR /app | ||
|
||
# copy the app, note .dockerignore | ||
COPY package.json . | ||
COPY package-lock.json . | ||
RUN npm ci | ||
|
||
FROM dependency-base AS production-base | ||
|
||
# build will also take care of building | ||
# if necessary | ||
COPY . . | ||
RUN npm run build | ||
|
||
FROM $NODE_VERSION-slim AS production | ||
|
||
COPY --from=production-base /app/.output /app/.output | ||
|
||
# Service hostname | ||
ENV NUXT_HOST=0.0.0.0 | ||
|
||
# Service version | ||
ARG NUXT_APP_VERSION | ||
ENV NUXT_APP_VERSION=${NUXT_APP_VERSION} | ||
|
||
# Run in production mode | ||
ENV NODE_ENV=production | ||
|
||
# start the app | ||
CMD [ "node", "/app/.output/server/index.mjs" ] |
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,107 @@ | ||
# App | ||
|
||
This is a project starter for your Nuxt 3 + Typescript application. This starter is meant to help you to start new projects, Nuxt 3 is a frontend + backend ("fullstack") framework that natively enforces typed JavaScript ("TypeScript"). Nuxt 3 is based on Vue 3. | ||
|
||
This starter has the following features: | ||
- slim docker ready | ||
```sh | ||
> docker build -t nuxt3-app . | ||
> docker run -p 3000:3000 --init --rm nuxt3-app | ||
``` | ||
- Note: Docker is not required for development or deployment - for development `sqlite3` is used and will launch automatically via `npm run dev` 🚀 | ||
- Component stories via `Histoire`: | ||
```sh | ||
> npm i | ||
> npm run story | ||
``` | ||
- Linting & Formatting (`npm run lint`) | ||
- `npm run lint:style`: eslint for formatting & linting | ||
- `npm run lint:style -- --fix`: Autofix styles and lints where possible | ||
- `npm run lint:types`: typescript typechecking | ||
- Testing & Code Coverage & Component Snapshots | ||
- `npm run test`: Run tests once, report results and coverage | ||
- `npm run test:watch`: Run tests and watch file changes, run tests for changed files | ||
- `npm run test -- -u`: Update component snapshots after components changed | ||
- `npm run test -- -t "some test-text"`: Run all tests with `some test-text` in their `test(...)` description | ||
- `@testing-library/vue` for easy and best-practice component tests, [see example here](https://testing-library.com/docs/vue-testing-library/examples) | ||
- breakpoint debugging in VS Code | ||
- CSS usable without imports | ||
- Utility & Styling: TailwindCSS 3 | ||
- Components: Ant Design Vue with component-auto-import | ||
- Miscallaneous | ||
- Pre-commit checking (husky) & fixing (lint-staged) | ||
- github CI pipeline to linting, testing, typing checks | ||
- nuxt-component support in tests and histoire | ||
- debug sql database queries by setting `logging: true` in the `database/index.ts`: This will show you a live log of all ongoing database queries which is super helpful to debug database problems | ||
|
||
## Local Setup | ||
|
||
If this is not the first time you use `npm` / `node` v16 on your setup: | ||
```sh | ||
> npm i | ||
|
||
# development mode with hot reloading | ||
> npm run dev | ||
|
||
# component based development via histoire | ||
> npm run story | ||
|
||
# testing via vitest | ||
> npm run test | ||
> npm run test:watch # watch tests | ||
|
||
# run a specific test by text | ||
> npm run test -- -t "text of test" | ||
|
||
# update html screenshots of components | ||
> npm run test -- -u | ||
|
||
# linting & type checks | ||
> npm run lint | ||
> npm run lint -- --fix # autofix lints | ||
|
||
# breakpoint debugging (zero-config in VS Code) | ||
# 1. Open the command palette (CMD / CTRL + SHIFT + P) | ||
# 2. Select "Debug: JavaScript Debug Terminal" | ||
# 3. Run any `npm` command inside `app/`, e.g.: `npm run test` | ||
# 4. Your code editor colors should change a bit (e.g.: to orange) while executing the command, the left side should show deep execution insights | ||
# 5. Set breakpoints (click left of line count in editor - red dot should appear) - the debugger will automatically work and stop at them and allow you to inspect variables | ||
> npm run test # also works for more specific tests via `-t` option (see above) | ||
``` | ||
|
||
### First time setup | ||
|
||
If this is the first time you run a `npm` / `node` app on your setup: | ||
|
||
1. Install the `node` version manager `nvm` by running: | ||
```sh | ||
> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | ||
``` | ||
2. Install the required `node` and `npm` version: | ||
```sh | ||
# uses `.nvmrc` to install required version | ||
> nvm install | ||
``` | ||
3. Use the required `node` and `npm` version: | ||
```sh | ||
# uses `.nvmrc` to use required version | ||
> nvm use | ||
|
||
# ALTERNATIVE: make node 16.14.2 your default node version (version copied from `.nvmrc`, check there for most up to date node version) | ||
> nvm alias default 16.14.2 | ||
``` | ||
4. Install a code editor (recommended: VS Code), [get it here](https://code.visualstudio.com/) | ||
5. Uninstall or disable the old Vue VS Code extension `Vetur`, else conflicts may arise between `volar` and `Vetur` | ||
6. Install the `volar` extension to support `vue`, `nuxt` and `typescript` development help | ||
- for vs code: https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar | ||
- sublime LSP: https://github.com/sublimelsp/LSP-volar | ||
- vim: https://github.com/yaegassy/coc-volar | ||
7. Enable "take over mode" for volar for this project. | ||
- documented here: https://github.com/johnsoncodehk/volar/discussions/471 | ||
- for VS Code: | ||
1. Run (CMD/CTRL + SHIFT + P): Extensions: Show Built-in Extensions | ||
2. Find "TypeScript and JavaScript Language Features" | ||
3. Right click and select "disable for workspace" | ||
4. Reload the editor | ||
5. A message "Take over mode enabled" (or similar) should appear | ||
8. Go to the [top of this section](#local-setup) and execute commands |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please: