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

urdf uploading #259

Merged
merged 9 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
- name: Write .env.production
working-directory: frontend
run: |
echo "REACT_APP_GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }}" >> .env.production
echo "REACT_APP_BACKEND_URL=${{ secrets.BACKEND_URL }}" >> .env.production
echo "VITE_APP_GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }}" >> .env.production
echo "VITE_APP_BACKEND_URL=${{ secrets.BACKEND_URL }}" >> .env.production

- name: Build frontend
run: |
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export AWS_SECRET_ACCESS_KEY=test
export AWS_ENDPOINT_URL_S3='http://127.0.0.1:4566'

# For letting the frontend know the backend URL.
export REACT_APP_BACKEND_URL='http://127.0.0.1:8080'
export VITE_APP_BACKEND_URL='http://127.0.0.1:8080'

# For SMTP
export SMTP_HOST='smtp.gmail.com'
Expand Down Expand Up @@ -152,7 +152,7 @@ npm install
To serve the React frontend in development mode:

```bash
npm start
npm run dev
```

To build the React frontend for production:
Expand All @@ -169,13 +169,13 @@ npm run format

### Google Client ID

You will need to set `REACT_APP_GOOGLE_CLIENT_ID`. To do this, first create a Google client id (see [this LogRocket post](https://blog.logrocket.com/guide-adding-google-login-react-app/)). Then create a `.env.local` file in the `frontend` directory and add the following line:
You will need to set `VITE_APP_GOOGLE_CLIENT_ID`. To do this, first create a Google client id (see [this LogRocket post](https://blog.logrocket.com/guide-adding-google-login-react-app/)). Then create a `.env.local` file in the `frontend` directory and add the following line:

```
REACT_APP_GOOGLE_CLIENT_ID=your-client-id
VITE_APP_GOOGLE_CLIENT_ID=your-client-id
```

Additionally, you should set `REACT_APP_BACKEND_URL` to the URL of the FastAPI backend. This should be `http://127.0.0.1:8080` when developing locally.
Additionally, you should set `VITE_APP_BACKEND_URL` to the URL of the FastAPI backend. This should be `http://127.0.0.1:8080` when developing locally.

## Testing

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ start-backend:
@fastapi dev 'store/app/main.py' --port 8080

start-frontend:
@cd frontend && npm start
@cd frontend && npm run dev

start-docker-dynamodb:
@docker kill store-db || true
Expand Down
2 changes: 1 addition & 1 deletion env.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export AWS_SECRET_ACCESS_KEY=test
export AWS_ENDPOINT_URL_S3='http://127.0.0.1:4566'

# For letting the frontend know the backend URL.
export REACT_APP_BACKEND_URL='http://127.0.0.1:8080'
export VITE_APP_BACKEND_URL='http://127.0.0.1:8080'

# For SMTP
export SMTP_HOST='smtp.gmail.com'
Expand Down
4 changes: 0 additions & 4 deletions frontend/.prettierrc

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Install requirements:

```bash
cd frontend # This directory
nvm use 20.10.0
nvm use v22.6.0
npm install
```

Start server:

```bash
npm start
npm run dev
```

Build static files:
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
10 changes: 8 additions & 2 deletions frontend/eslint.config.js → frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { fixupConfigRules } from "@eslint/compat";
import pluginJs from "@eslint/js";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import globals from "globals";
import tseslint from "typescript-eslint";

const reactSettings = {
Expand All @@ -13,7 +12,14 @@ const reactSettings = {
};

export default [
{ languageOptions: { globals: globals.browser } },
{
ignores: [
"node_modules/**/*",
"**/__tests__/**/*",
"*.config.ts",
"*.config.js",
],
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
reactSettings,
Expand Down
32 changes: 32 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />

<!-- SEO -->
<meta name="description" content="Buy and sell humanoid robots and robot parts online" />
<meta name="keywords" content="K-Scale Labs, Robot, Robots, Humanoid Robots, " />

<!-- View options -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#000000" />

<!-- Third-party stylesheets -->
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" />

<!-- Manifest -->
<link rel="icon" href="assets/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="assets/logo192.png" />
<link rel="manifest" href="assets/manifest.json" />

<title>Robolist</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="src/index.tsx"></script>
</body>

</html>
Loading
Loading