Skip to content

Commit

Permalink
chore: update workspaces and readme (#13)
Browse files Browse the repository at this point in the history
* chore: add scripts for the shared folder

* chore: update scripts for workspaces

* chore: create readme and add migrations up for the server

* chore: format code

* chore: workflows

* chore: fix workflow

* chore: change names

* chore: fix server workflow
  • Loading branch information
Michael-Liendo authored Jul 18, 2024
1 parent 04c7225 commit 5717c11
Show file tree
Hide file tree
Showing 30 changed files with 1,444 additions and 5,390 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
workdir: ./client

steps:
- name: Checkout Source
uses: actions/checkout@v3
Expand All @@ -27,13 +24,7 @@ jobs:
node-version: 20

- name: Install Dependencies
working-directory: ${{ env.workdir }}
run: npm install

- name: Lint Check
working-directory: ${{ env.workdir }}
run: npm run lint

- name: Build Check
working-directory: ${{ env.workdir }}
run: npm run build
- name: Client Build Check
run: npm run client:build
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
push:
branches:
- main
pull_request:

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install Dependencies
run: npm install

- name: Lint Check
run: npm run lint
12 changes: 2 additions & 10 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
workdir: ./server

steps:
- name: Checkout Source
Expand All @@ -27,16 +25,10 @@ jobs:
node-version: 20

- name: Install Dependencies
working-directory: ${{ env.workdir }}
run: npm install

- name: Lint Check
working-directory: ${{ env.workdir }}
run: npm run lint

- name: Build Check
working-directory: ${{ env.workdir }}
- name: Server Build Check
env:
NODE_ENV: production
PORT: 3000
run: npm run build
run: npm run server:build
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2024 Michael Liendo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Empty file removed LICENSE.md
Empty file.
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
# linx
<div align="center">
<h1 align="center">Linx</h1>
</div>

## Development

### Requirements

- [Node](https://nodejs.org/en/download/)
- [Docker](https://www.docker.com)

### Getting Started

```bash
git clone https://github.com/Michael-Liendo/linx.git

# step into repository directory
cd ./linx

# Install dependencies
npm install
```

#### Run Server

```bash
# Go to server
cd ./server

# Copy .env file
cp .env.example .env

# Run a PostgreSQL with Docker Compose
docker compose up

# Go to Root folder
cd ..

# Run the database migrations
npm run server:migrations:up

# Run the server
npm run server:dev
```

#### Run Client

```bash
# Go to server
cd ./client

# Copy .env file
cp .env.example .env

# Go to Root folder
cd ..

# Run the server
npm run client:dev
```

## License

Licensed under the MIT License
30 changes: 0 additions & 30 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +0,0 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
Loading

0 comments on commit 5717c11

Please sign in to comment.