Skip to content

Commit

Permalink
Merge pull request #7 from liglig99/frontend-setup
Browse files Browse the repository at this point in the history
Frontend Setup
  • Loading branch information
liglig99 authored Jul 6, 2024
2 parents aca83e7 + 658e66b commit 7ed57af
Show file tree
Hide file tree
Showing 57 changed files with 14,862 additions and 79 deletions.
10 changes: 7 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"features": {
"ghcr.io/devcontainers-contrib/features/nestjs-cli:2": {},
"ghcr.io/devcontainers-contrib/features/mongosh-homebrew": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker": {}
"ghcr.io/devcontainers/features/docker-outside-of-docker": {},
"ghcr.io/nordcominc/devcontainer-features/android-sdk": {
"platform": "34"
}
},
"customizations": {
"vscode": {
Expand All @@ -23,12 +26,13 @@
"humao.rest-client",
"mutantdino.resourcemonitor",
"GitHub.vscode-pull-request-github",
"ms-azuretools.vscode-docker"
"ms-azuretools.vscode-docker",
"expo.vscode-expo-tools"
]
}
},
"remoteUser": "node",
"postCreateCommand": "sudo chown node node_modules"
"postCreateCommand": "sudo chown node node_modules && sudo chown node frontend/node_modules"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/docker-compose.devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
volumes:
- .:/workspaces:delegated
- node_modules:/workspaces/node_modules
- node_modules_frontend:/workspaces/frontend/node_modules
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 3000:3000
Expand All @@ -26,3 +27,4 @@ services:

volumes:
node_modules:
node_modules_frontend:
69 changes: 54 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"echo": true,
"reveal": "silent",
"revealProblems": "onProblem",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": true
Expand All @@ -47,38 +46,78 @@
"echo": true,
"reveal": "silent",
"revealProblems": "onProblem",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": true
},
"isBackground": true
},
{
"label": "Workouts: Dev",
"label": "All: Dev",
"dependsOn": ["Gateway: Dev", "Auth: Dev"],
"group": {
"kind": "build",
"isDefault": true
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "Frontend: Expo",
"type": "shell",
"command": "pnpm start:dev workouts",
"command": "npx expo start --tunnel",
"group": "none",
"options": {
"cwd": "${workspaceFolder}/frontend"
},
"presentation": {
"echo": true,
"reveal": "silent",
"revealProblems": "onProblem",
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": true
},
"isBackground": true
"problemMatcher": []
},
{
"label": "All: Dev",
"dependsOn": ["Gateway: Dev", "Auth: Dev", "Workouts: Dev"],
"group": {
"kind": "build",
"isDefault": true
"label": "Setup Backend: PNPM Install",
"type": "shell",
"command": "pnpm install",
"group": "none",
"presentation": {
"echo": true,
"reveal": "never",
"panel": "shared",
"clear": true,
"close": true
},
"runOptions": {
"runOn": "folderOpen"
}
"problemMatcher": []
},
{
"label": "Setup Frontend: NPM Install",
"type": "shell",
"command": "npm install",
"options": {
"cwd": "${workspaceFolder}/frontend"
},
"group": "none",
"presentation": {
"echo": true,
"reveal": "never",
"panel": "shared",
"clear": true,
"close": true
},
"problemMatcher": []
},
{
"label": "Setup: All",
"dependsOn": [
"Setup Frontend: NPM Install",
"Setup Backend: PNPM Install"
]
}
]
}
67 changes: 6 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,17 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
A basic fitness tracker.

## Installation
## Dev Setup
This project is intended to be developed in a devcontainer. The main configuration can be found in the `.devcontainer` folder.

```bash
$ pnpm install
```
After the first startup execute the task `Setup: All` to install all required npm dependencies.

## Running the app

```bash
# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod
```

## Test

```bash
# unit tests
$ pnpm run test

# e2e tests
$ pnpm run test:e2e

# test coverage
$ pnpm run test:cov
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch
The Backend can be started with the task `All: Dev`. This starts all microservices including the gateway with hot-reload enabled.

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)
The Frontend can be started with the task `Frontend: Expo`. This task starts the [Expo Development Server](https://docs.expo.dev/develop/development-builds/use-development-builds/#start-the-development-server).

## License

Expand Down
35 changes: 35 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/

# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo
20 changes: 20 additions & 0 deletions frontend/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
return (
<View style={styles.container}>
<Text>Hello World</Text>
<StatusBar style="auto" />
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
15 changes: 15 additions & 0 deletions frontend/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# OSX
#
.DS_Store

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# Bundle artifacts
*.jsbundle
Loading

0 comments on commit 7ed57af

Please sign in to comment.