Skip to content

Commit

Permalink
Merge pull request #220 from elsoul/update/tov2
Browse files Browse the repository at this point in the history
update/tov2
  • Loading branch information
KishiTheMechanic authored Feb 24, 2024
2 parents 4223ec7 + d89966a commit 1f38a31
Show file tree
Hide file tree
Showing 30 changed files with 50 additions and 3,251 deletions.
75 changes: 0 additions & 75 deletions articles/doc/en/frontend/nextjs-graphql-template.md

This file was deleted.

4 changes: 2 additions & 2 deletions articles/doc/en/general/motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Skeet allows you to get your app up and running quickly and maintain it for the

## Serverless architecture powered by GCP (Google Cloud) and Firebase

![Effortless Serverless Skeet](/doc-images/motivation/EffortlessServerlessSkeet.png)
![Skeet - Just Build it.](https://storage.googleapis.com/skeet-assets/imgs/v2/SkeetV2EN.jpg)

GCP (Google Cloud) and Firebase is an app development platform that helps you build and scale the apps and games your users love. It is a service highly trusted by many companies worldwide, supported by Google's infrastructure.

Expand All @@ -42,7 +42,7 @@ Furthermore, maintenance costs are significantly reduced. Post-release apps also

Skeet is an open-source, full-stack serverless app development solution that makes Firebase and Google Cloud product combinations easier and easier to use.

Skeet CLI is not only for setting, deploying, and managing Firebase products but also for application development, such as VPN network settings, domain and name server settings, load balancer management security settings using Cloud Armor, and CI & CD using GitHub Actions. We provide that with a single command. The database is not only Firestore, but it is also possible to build a GraphQL API using Cloud SQL. Skeet supports full-stack development from backend construction to front-end web, iOS, and Android development.
Skeet CLI is not only for setting, deploying, and managing Firebase products but also for application development, such as VPN network settings, domain and name server settings, load balancer management security settings using Cloud Armor, and CI & CD using GitHub Actions. We provide that with a single command. The database is not only Firestore, but it is also possible to build with multiple Cloud SQLs and NEON serverless Postgres. Skeet supports full-stack development from backend construction to front-end web, iOS, and Android development.

In addition, for more scalable and robust application development, we adopt tools useful for development, such as TypeScript, Jest, ESLint & Prettier by default. TypeScript is mainly used for ease of application creation, but it is also possible to build applications that partially utilize machine learning using Python.

Expand Down
4 changes: 2 additions & 2 deletions articles/doc/en/general/overall-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: Overall Architecture for the development of Skeet, an open-source s

## Overall Architecture Diagram

![Skeet Architecture](https://storage.googleapis.com/skeet-assets/imgs/SkeetArchitecture.png)
![Skeet Architecture](https://storage.googleapis.com/skeet-assets/imgs/v2/SkeetArchitectureV2.jpg)

Skeet is an open-source serverless application development framework created with TypeScript.

It allows the selection and utilization of necessary features according to the project requirements. Some projects may only need to use Firebase Functions combined with WebAPI. For instance, by using the Discord API, it's possible to omit frontend development and focus on functionality.

As needed, web frontends, mobile apps, or GraphQL servers can be implemented later, and as data accumulates, sophisticated analysis with BigQuery becomes feasible. Furthermore, templates for blockchain wallet compatibility are available, making the development of Web3 apps and dApps immediate.
As needed, web frontends, mobile apps, or Web API servers can be implemented later, and as data accumulates, sophisticated analysis with BigQuery becomes feasible. Furthermore, templates for blockchain wallet compatibility are available, making the development of Web3 apps and dApps immediate.

With full support for cloud architecture construction by Skeet CLI, developers can concentrate on application development. Skeet CLI also boasts features like scaffolding and file sharing between frontend and backend, significantly reducing the time needed for feature implementation. Support includes over 80 languages for translation file generation (producing md or json files for app use), Prisma schema file generation, code file creation tailored to Firebase Functions routing (http, pub/sub, scheduler, etc.), and automatic generation of TypeDoc to enhance code maintainability, all supported by generative AI.

Expand Down
93 changes: 0 additions & 93 deletions articles/doc/en/plugins/skeet-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,99 +22,6 @@ Skeet Utils TypeDoc

# Http

## `skeetGraphql` Function

### Description:

Executes a GraphQL query against a given endpoint.

### Parameters:

- `accessToken` (string): The access token for authentication.
- `endpoint` (string): The endpoint URL for the GraphQL server.
- `query` (string): The GraphQL query to execute.
- `variables` (V, optional): Optional variables to be used in the GraphQL query.

### Returns:

- (Promise<T>): Returns a promise that resolves to the result of the GraphQL query.

### Throws:

Will throw an error if the GraphQL query fails.

### Example:

```typescript
import { skeetGraphql } from '@skeet-framework/utils'
import { User } from '@/models'

const query: CreateUserQuery = `mutation Mutation(
$uid: String
$username: String
$email: String
$iconUrl: String
) {
createUser(uid: $uid, username: $username, email: $email, iconUrl: $iconUrl) {
id
rawId
uid
username
email
iconUrl
role
iv
createdAt
updatedAt
}
}`
const variables: CreateUserParams = {
uid: 'your_uid',
username: 'your_username',
email: 'your_email',
iconUrl: 'your_icon_url',
}
const accessToken = 'your_access_token'
const endpoint = 'https://your-production-endpoint.com/graphql'

const user = await skeetGraphql<User, CreateUserParams>(
accessToken,
endpoint,
query
)
console.log(user)
```

### Implementation:

```typescript
export const skeetGraphql = async <T, V>(
accessToken: string,
endpoint: string,
query: string,
variables = {} as V
): Promise<T> => {
const baseUrl =
skeetEnv === 'production' ? endpoint : 'http://localhost:3000/graphql'
console.log({ query })

try {
const res = await fetch(baseUrl, {
method: 'POST',
body: JSON.stringify({ query, variables }),
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
},
})
const result: T = await res.json()
return result
} catch (error) {
throw new Error(`skeetGraphql failed: ${error}`)
}
}
```

## `sendGet` Function

### Description:
Expand Down
4 changes: 1 addition & 3 deletions articles/doc/en/skeet-ai/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ Function mode allows you to automatically generate Firebase Functions.

## Skeet AI YouTube - 7/7. How to Use Function Mode (Video)

YouTube video link: https://youtu.be/mg_KOo5--ZI

[![How to Use Function Mode](https://storage.googleapis.com/skeet-assets/imgs/youtube/skeet-ai-function-en-7.png)](https://youtu.be/mg_KOo5--ZI)
https://youtu.be/mg_KOo5--ZI

## Launching Function Mode

Expand Down
10 changes: 5 additions & 5 deletions articles/doc/en/skeet-ai/translate.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ $ skeet get files --limit 5 --translate
"ja"
],
"paths": [
"/Users/fumi/Dev/ts/skeet-graphql/skeet-cloud.config.json",
"/Users/fumi/Dev/ts/skeet-graphql/functions/skeet/package.json",
"/Users/fumi/Dev/ts/skeet-graphql/tmp/data/firebase-export-metadata.json",
"/Users/fumi/Dev/ts/skeet-graphql/tmp/data/storage_export/buckets.json",
"/Users/fumi/Dev/ts/skeet-graphql/tmp/data/auth_export/config.json"
"/Users/fumi/Dev/ts/skeet-functions/skeet-cloud.config.json",
"/Users/fumi/Dev/ts/skeet-functions/functions/skeet/package.json",
"/Users/fumi/Dev/ts/skeet-functions/tmp/data/firebase-export-metadata.json",
"/Users/fumi/Dev/ts/skeet-functions/tmp/data/storage_export/buckets.json",
"/Users/fumi/Dev/ts/skeet-functions/tmp/data/auth_export/config.json"
]
}
? Are you ready to proceed? (Use arrow keys)
Expand Down
10 changes: 5 additions & 5 deletions articles/doc/en/skeet-ai/typedoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ You: $ typedoc
Skeet:
📚 TypeDoc Mode 📚
? Please select the file path to generate TypeDoc. (Use arrow keys)
❯ /Users/fumi/Dev/ts/skeet-graphql/tmp/ai/history-ja.jsonl
/Users/fumi/Dev/ts/skeet-graphql/skeet-cloud.config.json
/Users/fumi/Dev/ts/skeet-graphql/graphql/build.ts
/Users/fumi/Dev/ts/skeet-graphql/graphql/devBuild.ts
/Users/fumi/Dev/ts/skeet-graphql/functions/skeet/yarn.lock
❯ /Users/fumi/Dev/ts/skeet-sql/tmp/ai/history-ja.jsonl
/Users/fumi/Dev/ts/skeet-sql/skeet-cloud.config.json
/Users/fumi/Dev/ts/skeet-sql/sql/build.ts
/Users/fumi/Dev/ts/skeet-sql/sql/devBuild.ts
/Users/fumi/Dev/ts/skeet-sql/functions/skeet/yarn.lock
```
Recently edited files will be displayed as candidates.
4 changes: 2 additions & 2 deletions articles/doc/en/skeet-firestore/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ $ npm i -g @skeet-framework/cli
```

If npm is not installed, you can install it with the following command.
(This command installs nodenv, node, npm, @skeet-framework/cli and edits .profile/.zshrc.)
(This command installs pnpm, Java, @skeet-framework/cli and edits .profile/.zshrc.)

```bash
$ sh -c "$(curl -sSfL https://storage.googleapis.com/skeet-assets/resources/v1.0.2-install)"
$ sh -c "$(curl -sSfL https://storage.googleapis.com/skeet-assets/resources/install-v1.5.0)"
```

## Creating a Google Cloud Project
Expand Down
4 changes: 2 additions & 2 deletions articles/doc/en/skeet-firestore/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ $ npm install -g firebase-tools
```

If npm is not installed, you can install it with the following command.
(This command installs nodenv, node, npm, @skeet-framework/cli and edits .profile/.zshrc.)
(This command installs pnpm, Java, @skeet-framework/cli and edits .profile/.zshrc.)

```bash
$ sh -c "$(curl -sSfL https://storage.googleapis.com/skeet-assets/resources/v1.0.2-install)"
$ sh -c "$(curl -sSfL https://storage.googleapis.com/skeet-assets/resources/install-v1.5.0)"
$ npm install -g firebase-tools
```

Expand Down
Loading

0 comments on commit 1f38a31

Please sign in to comment.