Skip to content

Commit 8f06e8c

Browse files
committed
init
1 parent 2b37479 commit 8f06e8c

File tree

8 files changed

+1032
-5425
lines changed

8 files changed

+1032
-5425
lines changed

README.md

Lines changed: 8 additions & 213 deletions
Original file line numberDiff line numberDiff line change
@@ -1,218 +1,13 @@
1-
A template/boilerplate for creating nextjs applications that use deep. It is recommended to merge with this repository to have its improvements in your nextjs application!
1+
# Deep.Memo App
22

3-
Just erase `pages/index.tsx` `Page` component body.
3+
[SDK](https://github.com/deep-foundation/sdk) based application, with configured [@deep-foundation/deepmemo-imports](https://github.com/deep-foundation/deepmemo-imports).
44

5-
# Variables
5+
[![Gitpod](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/deep-foundation/deepmemo-app)
6+
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label&color=purple)](https://discord.gg/deep-foundation)
67

7-
```sh
8-
// Optional
9-
NEXT_PUBLIC_GRAPHQL_URL=DeepPath
10-
NEXT_PUBLIC_DEEP_TOKEN=DeepToken
11-
NEXT_PUBLIC_I18N_DISABLE=1
12-
```
13-
14-
# How to make this repository pullable in your repository
15-
```
16-
git remote add sdk https://github.com/deep-foundation/sdk.git
17-
git fetch sdk
18-
git merge sdk/main --allow-unrelated-histories --strategy ours
19-
```
20-
Note that we use `ours` strategy during merge to avoid any changed in your existing project
21-
## How to pull some new commits but not old
22-
If you want to get some-commits to your repository - merge with `ours` strategy with old sdk commit that is created before required changes and then merge with main
23-
```
24-
git remote add sdk https://github.com/deep-foundation/sdk.git
25-
git fetch sdk main
26-
git merge sdk/some_old_commit_hash --allow-unrelated-histories --strategy ours
27-
git merge sdk/main
28-
```
29-
Note: I am sure that it is not the only way to do this. Possibly you can use `cherry-pick` to do this
30-
31-
Now you can pull changes from this repository by using
32-
```
33-
git pull sdk main
34-
```
8+
## envs
359

36-
## Prerequisitions
37-
- Install and use nodejs version from .nvmrc
38-
```
39-
nvm install 18 && nvm alias default 18; npm use default;
40-
```
41-
- Install dependencies
42-
```
43-
npm ci; (cd electron; npm ci)
44-
```
45-
- Run by using [How to run](#how-to-run)
46-
- Pass graphql url and token
47-
To easily get token you can use `Copy token` button in the menu of deepcase. In the same menu you can find `gql` button where you can get graphql path
48-
- Install Homebrew
49-
```
50-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
51-
```
52-
53-
## How to build manually
54-
55-
### Web
56-
Development
57-
```
58-
npm run dev
5910
```
60-
<details>
61-
<summary>screenshot</summary>
62-
63-
![dev](https://private-user-images.githubusercontent.com/7591093/323526946-f3b86b4c-8547-4959-8cb9-0de988da8932.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0MjkzNzUsIm5iZiI6MTcxMzQyOTA3NSwicGF0aCI6Ii83NTkxMDkzLzMyMzUyNjk0Ni1mM2I4NmI0Yy04NTQ3LTQ5NTktOGNiOS0wZGU5ODhkYTg5MzIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMDgzMTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTM1ODE3NzIyYWUyZGRiYjA4MGM1NWY0MTgzNzc2MmVjYWQ4NzBmZjk2MmUxNDAwZGM1MjdjODdlZjJlZDQ0MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.UFW6QrFdxr6MD4V5JWzTfTUflIc5hNwJn4JRi4sdKF4)
64-
</details>
65-
66-
Build server+client build with ssr
67-
```
68-
npm run build &&
69-
npm run start
70-
```
71-
Export static client without server
72-
```
73-
npm run export
74-
```
75-
76-
77-
### Android
78-
Prepare:
79-
- Install Android Studio.
80-
- Install in (Settings -> Languages & Frameworks -> Android SDK -> SDK Tool):
81-
- Android SDK Command-line Tools
82-
- Android Emulator
83-
- Android SDK Platfrom-Tool
84-
- Google Play services
85-
- Install in (Settings -> Languages & Frameworks -> Android SDK -> SDK Platforms):
86-
- Android 14
87-
Build:
88-
```
89-
npm run build-android &&
90-
npm run open-android
91-
```
92-
<details>
93-
<summary>screenshot</summary>
94-
95-
![ios](https://private-user-images.githubusercontent.com/7591093/323526940-51c8fb68-1e47-4d36-b51a-6deaa9266237.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0MjkzNzUsIm5iZiI6MTcxMzQyOTA3NSwicGF0aCI6Ii83NTkxMDkzLzMyMzUyNjk0MC01MWM4ZmI2OC0xZTQ3LTRkMzYtYjUxYS02ZGVhYTkyNjYyMzcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMDgzMTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGYwMDIwMDRlOTE4OGYzNzQwMDNhZmJlN2UxYjM5NzQ0YzNhODliMDNkOWMwYjEzMmI3YzY2YTM5YTk1OGQ3MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.zNXdV6h0oKfoxu6Zhc0Hf3VhHGrWX5vqD7z2JSErfaw)
96-
</details>
97-
98-
### IOS
99-
Prepare:
100-
- Xcode 10 or later installed on your Mac.
101-
- execute this
102-
```
103-
brew install cocoapods
104-
(cd ios/App/App; pod install)
105-
```
106-
Build
107-
```
108-
npm run build-ios &&
109-
npm run run-ios
110-
```
111-
<details>
112-
<summary>screenshot</summary>
113-
114-
![ios](https://private-user-images.githubusercontent.com/7591093/323526924-32fdf661-0258-498f-9816-f78fbfee0459.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0MjkzNzUsIm5iZiI6MTcxMzQyOTA3NSwicGF0aCI6Ii83NTkxMDkzLzMyMzUyNjkyNC0zMmZkZjY2MS0wMjU4LTQ5OGYtOTgxNi1mNzhmYmZlZTA0NTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMDgzMTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzU5ODIzNzJmNGFjZDQwY2ZiZGJlZTdlZTIxODE0NmY4Mjc3NmQ1ODZmM2FkMDRhMWMzZjk4MDVjZTdmZjNhOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Qo6ndiyTTSoKR2NB8r7mcf8ttU1yaITxFyt6UYiZkPI)
115-
</details>
116-
117-
### Windows
118-
```
119-
npm run build-windows
120-
```
121-
122-
### Unix
123-
```
124-
npm run build-unix
125-
```
126-
127-
### Mac
128-
Prepare:
129-
- Xcode 10 or later installed on your Mac.
130-
- An [Apple Developer](https://developer.apple.com/) account.
131-
- [An app-specific password for your ADC account’s Apple ID](https://support.apple.com/HT204397)
132-
- `security add-generic-password -l "sdk" -a "YOUR-APPLEID-EMAIL" -s "keychain" -T "" -w "APP-PASSWORD-FROM-APPLE"`
133-
- [Generate teamId](https://github.com/electron/notarize?tab=readme-ov-file#notes-on-your-teamid)
134-
- update APPLEIDPASS, APPLEID, CSC_NAME, APPLETEAMID in `package.json`.`scripts`.`build-mac`
135-
```
136-
npm run build-mac
137-
```
138-
<details>
139-
<summary>screenshot</summary>
140-
141-
![mac](https://private-user-images.githubusercontent.com/7591093/323526893-255e550b-619b-4e0a-bc0c-cc56875c5b95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0MjkzNzUsIm5iZiI6MTcxMzQyOTA3NSwicGF0aCI6Ii83NTkxMDkzLzMyMzUyNjg5My0yNTVlNTUwYi02MTliLTRlMGEtYmMwYy1jYzU2ODc1YzViOTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMDgzMTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDRlYjIxY2UxNWU0M2ZiZjRlZDM3N2M3ZGI0YmI4ZmFhZGYxMDRhNzU3NzY4MDdjMGFmYzJkNDhlZWVhY2FjYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.hae0zaplZWXoxE6DxN4mKrGWjC0-rYPXzzcOi5guZ4Q)
142-
</details>
143-
144-
### Chrome extension
145-
```
146-
npm run build-chrome-extension
147-
```
148-
Result path: `sdk/extension.crx` and `sdk/extension.pem`
149-
<details>
150-
<summary>screenshot</summary>
151-
152-
![chrome](https://private-user-images.githubusercontent.com/7591093/323526950-8f887f44-4ddf-48ad-aaef-e29a1886de39.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0MjkzNzUsIm5iZiI6MTcxMzQyOTA3NSwicGF0aCI6Ii83NTkxMDkzLzMyMzUyNjk1MC04Zjg4N2Y0NC00ZGRmLTQ4YWQtYWFlZi1lMjlhMTg4NmRlMzkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMDgzMTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODlkNjI5MWVmZDlmOWE4NTAxNjg1NGFhNTQ5YzFhZGUxOWIzM2Q2MzE2MTQ3YWNkZWYyODFhZGI5MDE0YzExNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.dN4z1V4dkKxCODh_YuSeDZUzufz_mZNesVbJoXXusYM)
153-
</details>
154-
155-
### Github Pages
156-
Only activate GitHub Pages for Your Repository
157-
158-
(Settings -> Pages -> Source -> Deploy from branch main -> Github Actions)
159-
160-
> There is no need to make any changes to the code.
161-
<details>
162-
<summary>screenshot</summary>
163-
164-
![gh-pages](https://private-user-images.githubusercontent.com/7591093/323527149-899e10e7-6ccb-4af9-9e16-33398f695e30.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0MjkzNzUsIm5iZiI6MTcxMzQyOTA3NSwicGF0aCI6Ii83NTkxMDkzLzMyMzUyNzE0OS04OTllMTBlNy02Y2NiLTRhZjktOWUxNi0zMzM5OGY2OTVlMzAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMDgzMTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzI5NTM5ZGMyOGM1NDVkMjYyMTkzODUwOTcyYjRlNmI5YTBmOTFhYWNkNWUxNWJhYjFjYzk1ZjI0MzQzYjYzOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.jPIxsWFV2uwMR_0hVuc-8M8gp6jKWoZuQOBNeWBKPiI)
165-
</details>
166-
167-
# Development
168-
You can use environment variables to set graphql path and token on server instead of setting it on client. See template in [.env.development](https://github.com/deep-foundation/sdk/blob/main/.env.development). Create a file `.env.local` with your values
169-
170-
# Translation i18n
171-
You can edit `/public/locales/*/*.json` files as `/public/locales/en/common.json` and use it inside your components as:
172-
```tsx
173-
const { t } = useTranslation();
174-
<div>{t('connection')}</div>
175-
```
176-
You **must** use this on every page:
177-
```tsx
178-
import { i18nGetStaticProps } from "../src/i18n";
179-
export async function getStaticProps(arg) {
180-
return await i18nGetStaticProps(arg);
181-
}
182-
```
183-
And this on every dynamc route page (as /path/[variable])
184-
```tsx
185-
export async function getStaticPaths() {
186-
return {
187-
paths: ['/path/123'],
188-
fallback: true
189-
}
190-
}
191-
```
192-
For support static `npm run export` of nextjs, you can use env variable NEXT_PUBLIC_I18N_DISABLE. But i18n is not available in export nextjs mode.
193-
194-
## Restart
195-
196-
### GitPod
197-
198-
SDK app is started together with Deep.Links and other services in GitPod. So to restart it from GitPod you should do the following:
199-
200-
1. Find terminal there `npm run gitpod-start` command was executed.
201-
![IMG_1490](https://github.com/deep-foundation/deepcase-app/assets/1431904/81ecd4d4-f4d2-4812-8948-0a155347218d)
202-
203-
2. Press `CTRL+C` in terminal to stop a Deep instance (Deep.Links and SDK).
204-
![IMG_1491](https://github.com/deep-foundation/deepcase-app/assets/1431904/39966c49-b8fd-4030-bcac-d8a0e4ff4e17)
205-
206-
3. Press `` button on your keyboard to get last executed command.
207-
![IMG_1492](https://github.com/deep-foundation/deepcase-app/assets/1431904/9ef60c58-ca70-43f3-be91-91966d85dddc)
208-
209-
4. Press `Enter` to execute that command again, that will finish restart sequence.
210-
![IMG_1493](https://github.com/deep-foundation/deepcase-app/assets/1431904/56f48dad-d751-44c7-8871-164f824f122b)
211-
212-
## NPM
213-
214-
If you want launch your repo from npx as `npx @deep-foundation/sdk` you must change name in package.json, manually `npm adduser` and first publish `npm publish --access public` yout fork.
215-
216-
For publish new version, just update package.json version field and then git commit && publish to github.
217-
218-
This app can be launched as builded web server with `npx @deep-foundation/sdk`
11+
export NEXT_PUBLIC_GQL_PATH=localhost:3006/gql;
12+
export NEXT_PUBLIC_GQL_SSL=0;
13+
```

chart/sdk/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
2-
name: deep-sdk
3-
description: Deep SDK sample application
2+
name: deepmemo-app
3+
description: Deep.Memo application
44

55
type: application
66

chart/sdk/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
{{- toYaml .Values.resources | nindent 12 }}
5656
{{- with .Values.nodeSelector }}
5757
imagePullSecrets:
58-
- name: deep-sdk
58+
- name: deepmemo-app
5959
nodeSelector:
6060
{{- toYaml . | nindent 8 }}
6161
{{- end }}

chart/sdk/values.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
replicaCount: 1
22

33
image:
4-
repository: registry.sdk.deep.foundation/deep-sdk
4+
repository: registry.deepmemo-app.deep.foundation/deepmemo-app
55
tag: "latest"
66
pullPolicy: Always
77

88
imagePullSecrets: false
9-
nameOverride: "deep-sdk"
9+
nameOverride: "deepmemo-app"
1010
fullnameOverride: ""
1111

1212
serviceAccount:
1313
create: true
1414
annotations: {}
15-
name: "deep-sdk"
15+
name: "deepmemo-app"
1616

1717
podAnnotations: {}
1818

@@ -34,13 +34,13 @@ ingress:
3434
cert-manager.io/cluster-issuer: letsencrypt
3535
kubernetes.io/ingress.class: nginx
3636
hosts:
37-
- host: sdk.deep.foundation
37+
- host: deepmemo.deep.foundation
3838
paths:
3939
path: /
4040
tls:
4141
- hosts:
42-
- sdk.deep.foundation
43-
secretName: sdk-tls
42+
- deepmemo.deep.foundation
43+
secretName: deepmemo-tls
4444

4545
resources: {}
4646

0 commit comments

Comments
 (0)