Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1066adc
feat: init baca cli
MSzalowski Mar 9, 2024
8100eff
feat: add screen generator
MSzalowski Mar 9, 2024
3704957
feat: handle tab navigation config
MSzalowski Mar 9, 2024
26bee65
feat: handle tab creation
MSzalowski Mar 9, 2024
2b68ed5
feat: migrate bootstrap script to typescript
MSzalowski Mar 9, 2024
1f0e49f
feat: code cleanup
MSzalowski Mar 9, 2024
6ffeb7d
Merge remote-tracking branch 'origin/main' into feat/BAC-82/scripts-g…
MateuszRostkowski Mar 10, 2024
500a695
chore: update scripts in package json
MateuszRostkowski Mar 10, 2024
c3d5f39
chore: remove not needed ts-expect-error directive
MateuszRostkowski Mar 10, 2024
6a3077d
Merge remote-tracking branch 'origin/main' into feat/BAC-82/scripts-g…
MateuszRostkowski Mar 31, 2024
aa5fefb
chore: move generate theme to scripts
MateuszRostkowski Mar 31, 2024
c91692c
chore: add script to generate component
MateuszRostkowski Mar 31, 2024
32c544f
chore: add scripts to package json
MateuszRostkowski Apr 1, 2024
9494883
Merge remote-tracking branch 'origin/main' into feat/BAC-82/scripts-g…
MateuszRostkowski Apr 11, 2024
0fa07e4
chore: add scripts documentation
MateuszRostkowski Apr 12, 2024
d92adec
chore: update package json scripts
MateuszRostkowski Apr 12, 2024
1ab7080
chore: update bootstrap docs
MateuszRostkowski Apr 12, 2024
1cf6869
chore: improve bootstrap script
MateuszRostkowski Apr 13, 2024
085c74f
chore: update package json scripts
MateuszRostkowski Apr 13, 2024
c0bc5af
chore: update readme template
MateuszRostkowski Apr 14, 2024
6094d50
chore: update bootstrap testing docs
MateuszRostkowski Apr 14, 2024
33a46d9
chore: update bootstrap script
MateuszRostkowski Apr 14, 2024
39fdfc9
chore: revert removing generateIconTypes function - p1
MateuszRostkowski Apr 15, 2024
dcf3d09
chore: revert removing generateIconTypes function - p2
MateuszRostkowski Apr 15, 2024
482902c
chore: properly move generateIconTypes file
MateuszRostkowski Apr 15, 2024
3b5a5db
chore: update package json
MateuszRostkowski Apr 16, 2024
2a8fadc
chore: remove not used script
MateuszRostkowski Apr 16, 2024
a3afde4
chore: update readme
MateuszRostkowski Apr 17, 2024
cae7e7c
chore: update scripts in package.json
MateuszRostkowski Apr 17, 2024
9c6a021
chore: update docs
MateuszRostkowski Apr 17, 2024
c1922da
chore: update readme scripts
MateuszRostkowski Apr 17, 2024
f6d0ac5
chore: refactor generate screen script to use enquirer instead of pro…
MateuszRostkowski Apr 17, 2024
35c121c
chore: refactor generate component script to use enquirer instead of pr
MateuszRostkowski Apr 17, 2024
fc5eb90
chore: update readme_template
MateuszRostkowski Apr 17, 2024
686360d
chore: improve baca cli to work as proffesional cli
MateuszRostkowski Apr 17, 2024
89acea5
chore: update tutorials docs
MateuszRostkowski Apr 18, 2024
cc438a8
chore: remove not needed script from package json
MateuszRostkowski Apr 18, 2024
edec8cb
chore: update bootstrap script
MateuszRostkowski Apr 19, 2024
82bf431
Merge remote-tracking branch 'origin/main' into feat/BAC-82/scripts-g…
MateuszRostkowski Apr 20, 2024
b1d8b29
chore: change name of the create new app docs
MateuszRostkowski Apr 20, 2024
cfca17f
chore: add overview to docs
MateuszRostkowski Apr 20, 2024
b28d44c
chore: update navigation in docs pages
MateuszRostkowski Apr 20, 2024
358a790
chore: support short version in bootstrap script
MateuszRostkowski Apr 20, 2024
e3e541a
chore: update readme
MateuszRostkowski Apr 21, 2024
765d679
chore: update scripts readme
MateuszRostkowski Apr 21, 2024
f918577
chore: update readme template
MateuszRostkowski Apr 22, 2024
dafbd76
fix: prevent issues in generate screen script
MateuszRostkowski Apr 23, 2024
a40edf0
chore: remove console.log
MateuszRostkowski Apr 23, 2024
a4fbc9e
chore: update overview docs
MateuszRostkowski Apr 23, 2024
57275a6
chore: remove packages and update scripts
MateuszRostkowski Apr 23, 2024
4eccdc1
chore: update readme
MateuszRostkowski Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules/
babel.config.js
webpack.config.js
docs

scripts/cli/build/
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ GoogleService-Info.plist
scripts/doppler_variables.sh
.env
env.json
.env*.local

.vercel
.env*.local

# baca-cli build
scripts/cli/build/
scripts/cli/temp/
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<img src="assets/logo/logo-light.png" alt="Logo">
</p>

[![MIT License](https://img.shields.io/npm/l/@binarapps/expo-ts-template?style=flat-square)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)
[![MIT License](https://img.shields.io/npm/v/@binarapps/expo-ts-template?style=flat-square)](https://img.shields.io/npm/v/@binarapps/expo-ts-template?style=flat-square)
[![MIT License](https://img.shields.io/npm/dt/@binarapps/expo-ts-template?style=flat-square)](https://img.shields.io/npm/dt/@binarapps/expo-ts-template?style=flat-square)
[![MIT License](https://img.shields.io/github/stars/binarapps/expo-ts-template?style=flat-square)](https://img.shields.io/github/stars/binarapps/expo-ts-template?style=flat-square)
[![MIT License](https://img.shields.io/npm/l/@binarapps/baca-react-native-template?style=flat-square)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)
[![MIT License](https://img.shields.io/npm/v/@binarapps/baca-react-native-template?style=flat-square)](https://img.shields.io/npm/v/@binarapps/baca-react-native-template?style=flat-square)
[![MIT License](https://img.shields.io/npm/dt/@binarapps/baca-react-native-template?style=flat-square)](https://img.shields.io/npm/dt/@binarapps/baca-react-native-template?style=flat-square)
[![MIT License](https://img.shields.io/github/stars/binarapps/baca-react-native-template?style=flat-square)](https://img.shields.io/github/stars/binarapps/baca-react-native-template?style=flat-square)
[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

# @binarapps/baca-react-native-template
Expand All @@ -18,7 +18,7 @@ This is a template to be used with react native and expo. It includes all the ne

## Documentation

Check out our [documentation page](https://baca-docs.vercel.app/docs/bootstrap/intro), it contains:
Check out our [documentation page](https://baca-docs.vercel.app/docs/overview), it contains:

- Bootstrapping project - tutorial how to easy setup from scratch
- Deploying app
Expand All @@ -28,15 +28,15 @@ Check out our [documentation page](https://baca-docs.vercel.app/docs/bootstrap/i

## Why to use?

We know there are a lot of project starters for react native, but we have some good features:
There are a lot of project starters for react native, we have some good features that other starters usually don't have:

- Fully works with **EXPO GO**
- Good for start of the project, later you can switch to expo-dev-client
- Fully works on **WEB**
- If you want to develop apps both on web and mobile this starter is good choice for you
- **Code generators** (create new screen / create new component)
- **Code generators** (create new screen / create new component and others)
- **Fully + Strong typed**
- **App deployment documentation** (currently in progress, but it will be added in near future)
- **App deployment documentation**

## How it looks?

Expand All @@ -48,35 +48,38 @@ We know there are a lot of project starters for react native, but we have some g

<!-- TODO: Add new recording -->

[![expo-ts-template binarapps](https://img.youtube.com/vi/NmTd5nXXTLI/0.jpg)](https://www.youtube.com/watch?v=NmTd5nXXTLI)
[![baca-react-native-template binarapps](https://img.youtube.com/vi/NmTd5nXXTLI/0.jpg)](https://www.youtube.com/watch?v=NmTd5nXXTLI)

## How to use?

We have prepared a detailed documentation for how to run project with this template - **[Bootstrap docs](https://baca-docs.vercel.app/docs/bootstrap/intro)**
We have prepared a detailed documentation for how to run project with this template - **[Bootstrap docs](https://baca-docs.vercel.app/docs/overview)**

It's great for production project, but if you want to just test it, you can follow the quick steps (on the bottom).

### Quick steps:

- `npx create-expo-app --template=@binarapps/expo-ts-template name_of_your_app`
- `npx create-expo-app --template=@binarapps/baca-react-native-template name_of_your_app`
- `cd name_of_your_app`
- `yarn bootstrap` - the cli will ask you some questions about your app (you can fill all this data later)

## What's inside?

[![MIT License](https://img.shields.io/npm/types/@binarapps/expo-ts-template?style=flat-square)](https://img.shields.io/npm/types/@binarapps/expo-ts-template?style=flat-square)
[![MIT License](https://img.shields.io/github/package-json/dependency-version/binarapps/expo-ts-template/expo?style=flat-square)](https://img.shields.io/github/package-json/dependency-version/binarapps/expo-ts-template/expo?style=flat-square)
[![MIT License](https://img.shields.io/github/package-json/dependency-version/binarapps/expo-ts-template/@react-navigation/native?style=flat-square)](https://img.shields.io/github/package-json/dependency-version/binarapps/expo-ts-template/@react-navigation/native?style=flat-square)
[![MIT License](https://img.shields.io/npm/types/@binarapps/baca-react-native-template?style=flat-square)](https://img.shields.io/npm/types/@binarapps/baca-react-native-template?style=flat-square)
[![MIT License](https://img.shields.io/github/package-json/dependency-version/binarapps/baca-react-native-template/expo?style=flat-square)](https://img.shields.io/github/package-json/dependency-version/binarapps/baca-react-native-template/expo?style=flat-square)
[![MIT License](https://img.shields.io/github/package-json/dependency-version/binarapps/baca-react-native-template/@react-navigation/native?style=flat-square)](https://img.shields.io/github/package-json/dependency-version/binarapps/baca-react-native-template/@react-navigation/native?style=flat-square)

### Implemented custom features

- custom cli
- run `yarn baca` to see available options
- generators:
- create screen - `yarn generate:screen`
- create component - `yarn generate:component`
- `yarn baca generate` | `yarn g`
- support of multiple environments
- production, staging, qa
- eas configuration
- update, build, submit
- deployment docs
- https://baca-docs.vercel.app/docs/overview
- verifying code on pull request - pipelines
- when creating pull request on github, there are tests, linters and types checks. If there will be some error you will be notified that something is wrong.
- custom fonts
Expand Down Expand Up @@ -117,11 +120,11 @@ It's great for production project, but if you want to just test it, you can foll
- [Reanimated v2](https://github.com/software-mansion/react-native-reanimated)
- Axios + React query
- Fetching data from backend
- Jotai
- State management

## What is planned in the future?

- add some state management tool - in progress
- write docs (app deployment, app setup and more) - in progress
- tutorial on how to use features
- navigation
- deepLinking
Expand All @@ -136,7 +139,6 @@ It's great for production project, but if you want to just test it, you can foll
- Create sample app and document the process of deployment
- Improve mock server logic
- add commit lint
- add script that display last update information (eas update)

### Implementations to add

Expand All @@ -157,13 +159,13 @@ Please adhere to this project's `code of conduct`.
Clone the project

```bash
git clone https://github.com/binarapps/expo-ts-template.git
git clone https://github.com/binarapps/baca-react-native-template.git
```

Go to the project directory

```bash
cd expo-ts-template
cd baca-react-native-template
```

Install dependencies
Expand Down
48 changes: 48 additions & 0 deletions docs/docs/OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
id: overview
slug: /overview
title: Overview
sidebar_position: 1
tags:
- Bootstrap
- Getting started
- Project structure
description: Bootstrap project structure, that is needed to start development your new project
---

# Overview

**Welcome in BACA starter!**

It is specialy designed to make react native apps development much easier and much faster.

## Why to use?

There are a lot of project starters for react native, we have some good features that other starters usually don't have:

- Fully works with **EXPO GO**
- Good for start of the project, later you can switch to expo-dev-client
- Fully works on **WEB**
- If you want to develop apps both on web and mobile this starter is good choice for you
- **Code generators** (create new screen / create new component and others)
- **Fully + Strong typed**
- **App deployment documentation**

## How to start?

1. Create new app - follow [this docs](/docs/bootstrap/create-new-app)

- At this point you can start development
- When you will need to show app to testers or client go to next step

2. Fill needed data to start deployment - follow [this docs](/docs/bootstrap/testing)

- This will make all required changes to the code base

3. Prepare deployment - follow [this docs](/docs/deploy/intro)

- Thanks to this docs you will have possibility to automatically deploy app to testers and

4. Send app to review and publish it on app stores

- We don't plan to make docs about that, but maybe in the future we will do that!
24 changes: 21 additions & 3 deletions docs/docs/bootstrap/BOOTSTRAP_TESTING.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: bootstrap-testing
slug: /bootstrap/testing
title: Bootstrap - testing
title: Prepare for testing
sidebar_position: 2
tags:
- Bootstrap
Expand Down Expand Up @@ -103,6 +103,16 @@ If you have some domain, for example: example.com, your bundle id could be: `com
open your app when tapped. It is only available in standalone apps.
</Details>

<Details title="8. Apple team id (optional)">

> **Optional step** - You can run the bootstrap script later

This can be found in developer apple console.

> Image will be added in future

</Details>

<Details title="You should have data like this:">

You can generate this data and save it in some notepad or somewhere else.
Expand All @@ -115,7 +125,8 @@ You can generate this data and save it in some notepad or somewhere else.
"slug": "expo_app_slug",
"easProjectId": "xxx-xxx-xxx-xx",
"scheme": "yourUrlScheme",
"adaptiveIconBackgroundColor": "#2E7AF0CC"
"adaptiveIconBackgroundColor": "#2E7AF0CC",
"appleTeamId": "1234XXXYYX"
}
```
</Details>
Expand All @@ -126,8 +137,15 @@ You can generate this data and save it in some notepad or somewhere else.

### **After you will collect all necessary data run this command:**

> If you don't have some value you can use default value, bootstrap script is collecting current data from code, so you can run this script multiple times
> **REMEBER** to have empty git repo because this script will do changes in your codebase

```sh
yarn bootstrap:new_app
yarn b

## OR

yarn baca bootstrap
```

## Potential issues
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
id: bootstrap
slug: /bootstrap/intro
title: Bootstrap - start development
slug: /bootstrap/create-new-app
title: Create new app
sidebar_position: 1
tags:
- Bootstrap
- Create new app
- Getting started
- Project structure
description: Bootstrap project structure, that is needed to start development your new project
Expand All @@ -16,7 +17,7 @@ import Details from '@site/src/components/Details'

Bootstrap project structure, that is needed to start development

## **What you need to do to start development?**
## **What you need to do, to start development**

---

Expand Down Expand Up @@ -62,7 +63,12 @@ If you do not have expo account → register on your company email. In terminal
eas register
```

You will be redirected to expo registration page. If something is not right please make sure you have eas cli installed - `npm install -g eas-cli`
You will be redirected to expo registration page. If something is not right please make sure you have eas cli installed

```bash
npm install -g eas-cli

```

Login to expo account on your local machine.

Expand Down Expand Up @@ -112,22 +118,28 @@ eas whoami

### Step 4.Sync project with code.

Synchronize the newly created Expo Project to your app.
Please gather this data:

1. **app name** - you can add **display name** from previous step, or add anything you want here, this name will be displayed for users later
2. **slug name** - created in 1-st point.
3. **owner** - organization picked from the list in 1-st point

In `app.json` file please insert the following:
:::note

1. **slug name** - created in 1-st point.
2. **owner** - organization picked from the list in 1-st point
If you will have issues with finding this values, please check [bootstrap testing docs](/docs/bootstrap/testing)

```json
{
"expo": {
"owner": "your_organization_name",
"slug": "your_app_name"
}
}
:::

If you gather all this data please run this command:

```bash
yarn baca bootstrap --simple
```

:::warning
Please verify all changes made with the script
:::

---

### Step 5. Make environment variables setup - [tutorial](/docs/doppler-config)
2 changes: 1 addition & 1 deletion docs/docs/bootstrap/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Start development",
"position": 1,
"position": 2,
"collapsible": true,
"collapsed": false,
"link": {
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Deployment",
"position": 2,
"position": 3,
"collapsible": true,
"collapsed": false,
"link": {
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorials/ICONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ It is added to the app as a font generated by [icomoon app](https://icomoon.io/a

9. Generate new types for icons

- run script generating icon types `yarn generate:icon:types`
- run script generating icon types `yarn baca generate icon-types`
2 changes: 1 addition & 1 deletion docs/docs/tutorials/NOTIFICATIONS_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Expo notifications are already preconfigured in this template. However, you stil
## Usage in expo dev client (expo run:\[android:ios\])

1. Make sure you have created your account in [expo.dev](http://expo.dev).
2. Follow [bootstrap](/docs/bootstrap/intro) docs
2. Follow [bootstrap](/docs/bootstrap/create-new-app) docs
3. Follow platform specific configuration.

### Android
Expand Down
Loading