Skip to content
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

Dev #60

Merged
merged 27 commits into from
Feb 5, 2024
Merged

Dev #60

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0828b27
Updating postProduct and createProduct to include product url
ryanjung1998 Jan 28, 2024
e174bcb
Merge pull request #50 from techstartucalgary/api
Axeloooo Jan 28, 2024
df52363
Scanner Endpoint, minimal error checking
ryanjung1998 Feb 3, 2024
8360245
Merge pull request #54 from techstartucalgary/scanner
Axeloooo Feb 3, 2024
7751041
fix: Data type in schema.primsa updated
Axeloooo Feb 2, 2024
55d0470
fix: Tables for databases cleaned up and updated
Axeloooo Feb 4, 2024
4b0c5f9
build: Mysql container added for development
Axeloooo Feb 4, 2024
f30974c
feat: Scanner feature cleaned up and improved functions
Axeloooo Feb 4, 2024
be097ba
feat: Tesseract custom error class implemented
Axeloooo Feb 4, 2024
68736b4
fix: Product provider issues fixed and algorithm feature deleted
Axeloooo Feb 4, 2024
39fff2a
fix: Scanner functions in service and repository classes explicitly t…
Axeloooo Feb 4, 2024
abb239e
fix: eng.traineddata file deleted
Axeloooo Feb 4, 2024
3b98dc4
Merge pull request #55 from techstartucalgary/feature/backend-scanner
Axeloooo Feb 4, 2024
e4634fe
feat: Zode validations added for scanner and product endpoints
Axeloooo Feb 4, 2024
446909b
feat: Zod validations added for scanner and product endpoints
Axeloooo Feb 4, 2024
56e2b64
lint: Eslint added for linting
Axeloooo Feb 4, 2024
858c952
fix: Issues with the request types infered by zod in controllers reso…
Axeloooo Feb 4, 2024
84cfb75
Merge pull request #57 from techstartucalgary/fix/controllers-return-…
Axeloooo Feb 4, 2024
8d4cd53
ci: Linting workflow implemented
Axeloooo Feb 4, 2024
bf26383
Merge branch 'dev' into ci/linting-workflow
Axeloooo Feb 4, 2024
6feb20f
Merge pull request #58 from techstartucalgary/ci/linting-workflow
Axeloooo Feb 4, 2024
87db61d
test: Unit testing for products services created
Axeloooo Feb 5, 2024
ad82c07
test: Unit testing for scanner service created
Axeloooo Feb 5, 2024
3f99f23
ci: Testing workflow added
Axeloooo Feb 5, 2024
acfcddb
build: Dependencies cleaned up and documentation added in package.json
Axeloooo Feb 5, 2024
83e8335
fix: Issue with typo in test workflow resolved
Axeloooo Feb 5, 2024
850b0ca
Merge pull request #59 from techstartucalgary/build/dependency-update
Axeloooo Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ on:
- dev

jobs:
lint:
runs-on: ubuntu-latest

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

- name: Install dependencies
run: cd backend && npm install

- name: Lint
run: cd backend && npm run lint

build:
runs-on: ubuntu-latest

Expand All @@ -19,3 +32,16 @@ jobs:

- name: Build
run: cd backend && npm run build

test:
runs-on: ubuntu-latest

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

- name: Install dependencies
run: cd backend && npm install

- name: Test
run: cd backend && npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
dist
migrations
.DS_Store
.vscode
.vscode
coverage
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- [Anfaal]() - Backend Developer
- [Ryan]() - Backend Developer
- [Alison]() - Backend Developer

## 👨‍💻 Tech Stack

- Frontend
Expand All @@ -51,12 +51,12 @@
![Node.js](https://img.shields.io/badge/Node.js-339933.svg?style=for-the-badge&logo=nodedotjs&logoColor=white)
![Prisma](https://img.shields.io/badge/Prisma-5a67d8.svg?style=for-the-badge&logo=Prisma&logoColor=white)
![MySQL](https://img.shields.io/badge/MySQL-3e6e93.svg?style=for-the-badge&logo=MySQL&logoColor=white)
![Zod](https://img.shields.io/badge/Zod-3E67B1.svg?style=for-the-badge&logo=Zod&logoColor=white)

- Cloud

![PlanetScale](https://img.shields.io/badge/PlanetScale-000000.svg?style=for-the-badge&logo=PlanetScale&logoColor=white)


## 🚀 Backend Documentation

All the code is located in the `backend/src` directory. The backend is written using [Node.js](https://nodejs.org/en/) and [Express](https://expressjs.com/).
Expand Down Expand Up @@ -187,39 +187,40 @@ datasource db {
npx prisma db push
```


# 🌟 Frontend Documentation

The frontend is crafted for iOS platforms, utilizing Swift and SwiftUI. The code is primarily housed in the `Rethread` directory. This section details the setup, development practices, and testing for the frontend environment.

## 🏃 Quickstart

1. **Clone the Repository**:
```bash
git clone [email protected]:techstartucalgary/fashion.git
```

```bash
git clone [email protected]:techstartucalgary/fashion.git
```

2. **Navigate to the Frontend Directory**:
```bash
cd Rethread
```

```bash
cd Rethread
```

3. **Open the Project in Xcode**:
Open the project file `.xcodeproj` in Xcode.
Open the project file `.xcodeproj` in Xcode.

4. **Run the Application**:
Select an iOS simulator or connected device in Xcode and click 'Run'.
Select an iOS simulator or connected device in Xcode and click 'Run'.

## 🛠️ Setup and Installation

1. **Install Xcode**:
Ensure you have Xcode installed on your macOS, available through the Mac App Store.
Ensure you have Xcode installed on your macOS, available through the Mac App Store.

2. **Update Swift and SwiftUI**:
Ensure you have the latest version of Swift and SwiftUI installed, as they are crucial for frontend development.
Ensure you have the latest version of Swift and SwiftUI installed, as they are crucial for frontend development.

3. **Verify the Installation**:
Open Xcode and check for Swift and SwiftUI updates in the preferences.
Open Xcode and check for Swift and SwiftUI updates in the preferences.

4. **Minimum iOS Version**: This app is built for `iOS 16` and above.

Expand Down
22 changes: 22 additions & 0 deletions backend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn"
}
}
2 changes: 2 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
# Keep environment variables out of version control
.env
dist
coverage
15 changes: 15 additions & 0 deletions backend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

services:
mysql:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: rethread
ports:
- "3306:3306"
volumes:
- mysql:/var/lib/mysql

volumes:
mysql:
19 changes: 19 additions & 0 deletions backend/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Config } from "jest";

const config: Config = {
preset: "ts-jest",
testEnvironment: "node",
verbose: true,
globals: {
"ts-jest": {
tsconfig: "tsconfig.json",
},
},
testMatch: ["<rootDir>/dist/**/*.test.js"],
coverageReporters: ["html"],
collectCoverage: true,
collectCoverageFrom: ["<rootDir>/dist/src/**/*.js"],
coverageDirectory: "<rootDir>/coverage",
};

export default config;
Loading
Loading