Skip to content

Commit

Permalink
feat: Update general docs
Browse files Browse the repository at this point in the history
  • Loading branch information
codinsonn committed Jan 7, 2024
1 parent 8104e61 commit 6f1f4a9
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 120 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Automatic deployments with Github Actions

We generally advise that you take full use of either [Vercel](vercel.com) or [Netlify](netlify.com) for automatic web deployments. These are quite good and easy to set-up / link to your repo in their UI.
We generally advise that you take full use of [Vercel](vercel.com) and [Expo](expo.dev) for automatic deployments. These are quite good and easy to set-up and link to your repo in their UI.

On top of this though, you can also enable automatic deployments through Github Actions to:
- [Chromatic](https://www.chromatic.com/) (deploys your storybook)
- [Expo](https://github.com/expo/expo-github-action) (runs `eas update` whenever a branch updates)
- Deploy your storybook docs with [Chromatic](https://www.chromatic.com/)
- Deploy your feature branches for testing with [Expo](https://github.com/expo/expo-github-action) (runs `eas update` whenever a branch updates)

Heads up though, as this will require setting up some secrets in your repository.

> We recommend doppler for managing and syncing secrets or env vars between services. You can find more information on how to set this up at [the doppler docs](https://docs.doppler.com/docs/github-actions).
> We recommend [doppler](doppler.com) for managing and syncing secrets or env vars between services. You can find more information on how to set this up at [the doppler docs](https://docs.doppler.com/docs/github-actions).
## Publishing with EAS update

A basic workflow for publishing with EAS update is already added to your project. You can find it in `.github/workflows/eas.yml`.
A basic workflow for publishing with EAS update is already added to your project when forking the repo. You can find it in `.github/workflows/eas.yml`.

However, it will only run when you add an `EXPO_ACCESS_TOKEN` secret to your repository. You can do this in the repository settings, but before you do that, you'll need to generate this token.
However, it will only run when you add an `EXPO_ACCESS_TOKEN` secret to your repository. You can do this in the repository settings, but before you do that, you'll need to generate this token in their UI.

### Creating an Expo project and generating an access token

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React from 'react'
import { useMemo } from 'react'
import { action } from '@storybook/addon-actions'
import { create as createTailwindWithConfig } from 'twrnc'
import { AetherText, AetherView } from '../../packages/@aetherspace/primitives'
import { useAetherRoute } from '../../packages/@aetherspace/navigation/useAetherRoute'
import { fetchAetherProps } from '../../packages/@aetherspace/navigation/fetchAetherProps'
import { getEnvVar } from '../../packages/@aetherspace/utils'
import tailwindConfig from '../../features/app-core/tailwind.config'
import { AetherText, AetherView } from '../../../../packages/@aetherspace/primitives'
import { useAetherRoute } from '../../../../packages/@aetherspace/navigation/useAetherRoute'
import { fetchAetherProps } from '../../../../packages/@aetherspace/navigation/fetchAetherProps'
import { getEnvVar } from '../../../../packages/@aetherspace/utils'
import tailwindConfig from '../../../../features/app-core/tailwind.config'

/* --- Styles ---------------------------------------------------------------------------------- */

Expand Down
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
config.resolve.alias['react-native$'] = require.resolve('react-native-web')
// Other aliases for web support (https://github.com/expo/expo/issues/21469#issuecomment-1576001543)
config.resolve.alias['expo-asset'] = 'expo-asset-web'
config.resolve.alias['aetherspace/navigation'] = require.resolve('./__mocks__/aetherspaceNavigation.tsx')
config.resolve.alias['aetherspace/navigation'] = require.resolve('./__mocks__/aetherspace/navigation/index.tsx')
config.resolve.alias['@aetherspace/clerk-auth/schemas'] = require.resolve('./__mocks__/@aetherspace-clerk-auth/schemas/index.ts')
config.resolve.alias['@aetherspace/clerk-auth/hooks'] = require.resolve('./__mocks__/@aetherspace-clerk-auth/hooks/index.tsx')
config.resolve.extensions.push('.ts', '.tsx')
Expand Down
28 changes: 22 additions & 6 deletions .storybook/plugins/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
<img src="/packages/@aetherspace/assets/AetherspaceLogo.svg" width="50" height="50" />

# Aetherspace Plugin Branches

While you can use any package you want in your Aetherspace monorepo, we've created a few plugin branches to make your life easier.
While you can use any package you want in your Aetherspace monorepo, we've created a few merge ready plugin branches to make the starterkit even more plug & play using git.

Some example use cases:
- Need to provide cross-platform authentication? (e.g. using Clerk) -> `git merge with/clerk-auth`
- Need to convert .svg files into cross-platform Icon components, or use known ones? -> `git merge with/green-stack-icons`
- Need utils to turn your single sources of truth into DB models? (e.g. for Mongoose? -> `git merge with/mongoose`)

Plugins are branches that you can merge (or copy) into your repo, and they'll usually add tools for aetherspace specific ways of working:
- `schemas/` - single sources of truth for the package / solution / plugin (e.g. Clerk auth, Mongoose, ...) and typescript types
- `routes/` - example pages and API routes to integrate the selected solution into your app
- `scripts/` - scripts to generate code from your schemas or assets (e.g. CRUD resolver generators for your DB models)

Some example use cases of merging in these plugin branches from the starter repo:
- Scripts to generate code from your schemas or assets (like converting .svg `with/green-stack-icons`)
- Utils to turn your schemas into models for your database (like on the `with/mongoose` branch)
- Extra helpers to make your life easier or integrate better with third party tools
... as well as `components/`, `hooks/`, `screens/`, `styles/`, `utils/` and more to optimize integrations through:
- ✅ Optimizing for cross-platform (Expo + Next.js) development
- ✅ Integrating with your [Single sources of truth](/packages/@aetherspace/schemas/README.md)
- ✅ Adding code generators to skip manual boilerplate

---
> 💚 To use plugin branches, you do need [access to the official green-stack-starter](https://github.com/sponsors/codinsonn).
> **💚 To use plugin branches, you do need [access to the official green-stack-starter](https://github.com/sponsors/codinsonn):**
---

![GithubTemplateRepo.png](/.storybook/public/GithubTemplateRepo.png)

![GithubTemplateRepoWithPlugins.png](/.storybook/public/GithubTemplateRepoWithPlugins.png)

While generating your repo from there, you can choose to "✅ include all branches".
Or, if you've already generated your repo, you can merge in the branches manually.

Expand Down
Binary file added .storybook/public/GithubTemplateRepo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6f1f4a9

Please sign in to comment.