-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat/vitepress #52
base: main
Are you sure you want to change the base?
feat/vitepress #52
Changes from all commits
1d036cd
7dd0119
536536c
09170cb
85bf9bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,5 +1,9 @@ | ||||
node_modules | ||||
|
||||
# viteoress cache file | ||||
/docs/.vitepress/cache | ||||
/docs/.vitepress/cache/deps | ||||
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
|
||||
|
||||
/.cache | ||||
/build | ||||
.env | ||||
|
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. Can we use |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,49 @@ | ||||
// .vitepress/config.js | ||||
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
|
||||
import { defineConfig } from "vitepress"; | ||||
|
||||
import { withMermaid } from "vitepress-plugin-mermaid"; | ||||
|
||||
export default withMermaid( | ||||
defineConfig({ | ||||
optimizeDeps: { | ||||
include: ["dayjs", "mermaid"], | ||||
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. Why |
||||
}, | ||||
|
||||
// class: "mermaid my-class", // set additional css classes for parent container | ||||
// }, | ||||
logo: "/favicon.ico", | ||||
title: "100Hunters", | ||||
description: "An awesome docs template built by me", | ||||
themeConfig: { | ||||
nav: [ | ||||
{ text: "Database", link: "/database" }, | ||||
{ text: "Environment variables", link: "/environment-variables" }, | ||||
{ text: "Storybook", link: "/storybook" }, | ||||
{ text: "Tailwind", link: "/tailwind" }, | ||||
{ text: "Testing", link: "/testing" }, | ||||
{ text: "Contributing", link: "/contributing" }, | ||||
], | ||||
sidebar: [ | ||||
{ | ||||
text: "Guide", | ||||
items: [ | ||||
{ text: "Introduction", link: "/introduction" }, | ||||
{ text: "Getting Started", link: "/guide/getting-started" }, | ||||
{ text: "Database", link: "/database" }, | ||||
{ text: "Environment variables", link: "/environment-variables" }, | ||||
{ text: "Storybook", link: "/storybook" }, | ||||
{ text: "Tailwind", link: "/tailwind" }, | ||||
{ text: "Testing", link: "/testing" }, | ||||
], | ||||
}, | ||||
], | ||||
socialLinks: [ | ||||
{ icon: "github", link: "https://github.com/alcpereira/100hunters" }, | ||||
], | ||||
}, | ||||
footer: { | ||||
message: "Released under the MIT License.", | ||||
copyright: "Copyright © 2022-present Adocs", | ||||
}, | ||||
}), | ||||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# How to contribute | ||
|
||
If you want to contribte but | ||
|
||
**you are not a member of the project** | ||
Fork and open a [PR](https://www.atlassian.com/fr/git/tutorials/making-a-pull-request) | ||
|
||
**or** | ||
Create a new branch, add your modifications and open a [PR](https://www.atlassian.com/fr/git/tutorials/making-a-pull-request) | ||
|
||
## Commit message format | ||
|
||
We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history. | ||
|
||
For more information see [commit-message](commit-message.html) | ||
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. Do we need the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,86 @@ | ||
## Database | ||
|
||
### Decision | ||
|
||
To practice SQL queries, we decided to NOT use an ORM. | ||
|
||
Using prepare statements only for saftey reasons, see [here](https://sidorares.github.io/node-mysql2/docs#using-prepared-statements) | ||
|
||
### Schema | ||
|
||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="../utils/mermaid/dark.png"> | ||
<img alt="Mermaid database schema" src="../utils/mermaid/light.png"> | ||
</picture> | ||
|
||
### Documentation | ||
|
||
Schema should be kept up to date using Mermaid Markdown in `utils/mermaid/schema.mmd` | ||
|
||
```mermaid | ||
--- | ||
title: 100hunters database schema | ||
--- | ||
erDiagram | ||
ACCOUNT { | ||
int id PK | ||
string email | ||
string username | ||
string password | ||
} | ||
ACCOUNT ||--|| BOARD : has | ||
BOARD { | ||
int id PK | ||
int accountId FK | ||
string title | ||
} | ||
BOARD ||--|{ COLUMN : contains | ||
COLUMN { | ||
int id PK | ||
int boardId FK | ||
string title | ||
int position | ||
} | ||
COLUMN ||--|{ CARD : contains | ||
CARD { | ||
int id PK | ||
int columnId FK | ||
int companyId FK | ||
string title | ||
string description | ||
string note | ||
int position | ||
} | ||
CARD }o--|| COMPANY : links | ||
COMPANY { | ||
int id PK | ||
string name | ||
string description | ||
} | ||
COMPANY ||--o{ CONTACT : contains | ||
CONTACT { | ||
int id PK | ||
int companyId FK | ||
string name | ||
string email | ||
string twitter | ||
string linkedin | ||
text note | ||
} | ||
CARD ||--|| TODO : contains | ||
TODO { | ||
int id PK | ||
int cardId FK | ||
boolean isDone | ||
} | ||
``` | ||
|
||
Visit the mermaid documentation page [here](https://mermaid.js.org/intro/) | ||
|
||
### Tools | ||
`mysql2` https://sidorares.github.io/node-mysql2/docs | ||
TypeScript + `mysql2` : https://sidorares.github.io/node-mysql2/docs/examples/typescript/row-data/index | ||
|
||
`mysql2` : | ||
https://sidorares.github.io/node-mysql2/docs | ||
|
||
`TypeScript + mysql2` : | ||
https://sidorares.github.io/node-mysql2/docs/examples/typescript/row-data/index |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,9 +1,11 @@ | ||||||
## Environment variables | ||||||
|
||||||
### Decision | ||||||
## Decision | ||||||
|
||||||
We are not using `dotenv` or similar packages. | ||||||
|
||||||
### Tools | ||||||
## Tools | ||||||
|
||||||
- `invariant` package to simply check if the essential variables are set and t | ||||||
- `--env-file=.env` as recommended per Node [docs ](https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs) | ||||||
- Remember to update `environment.d.ts` | ||||||
- Remember to update `environment.d.ts | ||||||
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
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Getting Started | ||
|
||
## Install the application | ||
|
||
We have decided to install the application with pnpm package manager. | ||
|
||
You can find here the reason we choose to use pnpm by reading this article from Nhost. Click [here](https://nhost.io/blog/how-we-configured-pnpm-and-turborepo-for-our-monorepo). | ||
|
||
## Setup Instructions | ||
|
||
1. Clone the [repository](https://github.com/alcpereira/100hunters.git) to your local machine. | ||
`git clone https://github.com/alcpereira/100hunters.git` | ||
2. Navigate to the project directory. | ||
3. Install dependencies using pnpm install. | ||
`bash pnpm install` | ||
if your installation get some error messages, you can try the following command | ||
`bash pnpm install --shamefully-hoist` | ||
to try to solve the problem. | ||
4. Set up the backend server and [database](/database). | ||
5. Run the frontend application using | ||
` pnpm start` | ||
6. Access the application through your web browser. | ||
7. Sign up or log in to start using the Kanban board for managing your job hunt. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 100Hunters project | ||
|
||
Explain what is 100hunters project. | ||
|
||
Can you explain it? |
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.