Skip to content

Commit

Permalink
Upload video
Browse files Browse the repository at this point in the history
  • Loading branch information
czystyl committed Sep 28, 2023
1 parent 5629e5f commit 3415a87
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{ "pattern": "apps/*/" },
{ "pattern": "packages/*/" }
],
"tailwindCSS.experimental.configFile": "./packages/config/tailwind/index.ts",
"tailwindCSS.experimental.configFile": "./tooling/tailwind/index.ts",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "node_modules/typescript/lib",
"[properties]": {
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# The Bank

[![VIDEO DEMO](https://github.com/czystyl/the-bank/blob/main/demo.mov)](https://github.com/czystyl/the-bank/blob/main/demo.mov)

## Project Structure

```
Expand Down Expand Up @@ -48,7 +50,6 @@ Make sure that you have installed and configured:

- **Node.js**: I recommend using NVM (Node Version Manager). [Installation Guide](https://github.com/nvm-sh/nvm)
- **pnpm**: [Installation Guide](https://pnpm.io/installation#using-npm)
- **Docker**: [Installation Guide](https://docs.docker.com/engine/install/)
- **iOS Simulator**: [Installation Guide](https://docs.expo.dev/workflow/ios-simulator/)
- **Android Studio Emulator**: [Installation Guide](https://docs.expo.dev/workflow/android-studio-emulator/)

Expand All @@ -72,15 +73,7 @@ To get it running, follow the steps below:
cp apps/mobile/.env.example .env
```

- Database setup

```sh
docker run --name the-bank-mysql -e MYSQL_ROOT_PASSWORD=password -d -p 3306:3306 mysql
```

> You can also get one from https://planetscale.com/

- Database synchronization (optional)
- Database synchronization
```
pnpm db:push
```
Expand Down
5 changes: 0 additions & 5 deletions apps/mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ const defineConfig: ExpoConfig = {
backgroundColor: "#1F104A",
},
},
extra: {
eas: {
projectId: "677df07c-8718-4abb-8a30-d86f985f47fb", // comment
},
},
experiments: {
tsconfigPaths: true,
typedRoutes: true,
Expand Down
3 changes: 1 addition & 2 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@the-bank/mobile",
"version": "0.1.0",
"private": true,
"main": "expo-router/entry",
"main": "index.tsx",
"scripts": {
"start": "expo start",
"dev": "expo start --ios",
Expand Down Expand Up @@ -30,7 +30,6 @@
"expo": "^49.0.11",
"expo-constants": "~14.4.2",
"expo-crypto": "~12.4.1",
"expo-dev-client": "~2.4.10",
"expo-image": "~1.3.2",
"expo-linking": "~5.0.2",
"expo-router": "^2.0.8",
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/app/(home)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import { formatCurrencyValue } from "@the-bank/core";

import { api } from "~/lib/api";
import { useAuth } from "~/lib/authProvider";
import { usePusherUpdates } from "~/lib/pusher";

export default function HomeScreen() {
const { user, signOut } = useAuth();
const apiUtils = api.useContext();

usePusherUpdates();
// For pushed you need a dev build
// usePusherUpdates();

const { data: userBalance, isLoading } = api.user.balance.useQuery();
const { mutate: addFoundsMutation } = api.transaction.addFounds.useMutation({
Expand Down
File renamed without changes.
Binary file added demo.mov
Binary file not shown.
12 changes: 4 additions & 8 deletions packages/api/src/router/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ export const transactionRouter = createTRPCRouter({
try {
await addFounds(ctx.auth.userId, input.value);

await PusherServer.trigger(
channels.mainChannel.name,
channels.mainChannel.events.addFounds,
{
value: input.value,
clerkUserId: ctx.auth.userId,
},
);
await PusherServer.trigger("channe_name", "addFounds", {
value: input.value,
clerkUserId: ctx.auth.userId,
});
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
Expand Down
63 changes: 0 additions & 63 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3415a87

Please sign in to comment.