orchetera
Version:
Welcome to **Orchetera** β your orchestration tool to kickstart Firebase-ready projects with ease!
143 lines (101 loc) β’ 3.53 kB
Markdown
# πΌ Orchetera CLI Quickstart
Welcome to **Orchetera** β your orchestration tool to kickstart Firebase-ready projects with ease!
## π Getting Started
1. **Run Orchetera**
```bash
npx orchetera [your-project-directory]
```
2. **π§ Setup Firebase Config**
Make sure `../firebaseConfig.js` exists and is properly filled.
If it doesnβt, complete it manually like so:
```js
// ../firebaseConfig.js
export const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.appspot.com",
messagingSenderId: "SENDER_ID",
appId: "APP_ID"
};
```
3. **β³ Let Orchetera Handle the Setup**
Sit back while Orchetera installs all required dependencies for you. π§ββοΈ
## π₯ Firebase Console Setup
Go to [Firebase Console](https://console.firebase.google.com/) and do the following:
- β
**Activate Hosting**
β οΈ *Select regular Hosting, not App Hosting.*
- β
**Enable Authentication**
Use the **Email/Password** provider.
- β
**Create Firestore Database**
Choose production mode or test mode.
## π‘οΈ Firestore Security Rules
> Replace the default rules with:
```js
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
```
## π Directory Generated
Example structure:
```
/your-project-directory
βββ /src
βββ firebaseConfig.js β
βββ .env
βββ ...
```
## π Environment Config (.env)
- β
`.env` file will be **automatically generated**.
- β
An **encrypted version** of `.env` will also be created for safe transfer across devices.
- π When switching devices, just **decrypt it**, and... boom! You're ready to run.
- π During env generation, a **password will appear in the CLI** β **copy and save it** securely.
### π Update or Decrypt .env
- To **re-encrypt** after modifying `.env`:
```bash
npx dechipera
```
- To **manually decrypt** on another machine:
```bash
npx dechipera --dec
```
## π GitHub + Auto Deployment Setup
Once Orchetera finishes its setup:
1. β
**Create a GitHub Repository**
Push your project to the repo.
2. β
**Add GitHub Variable (not secret)**
- Name: `DECHIPERA_TOKEN`
- Value: (Paste the **decryption password** from the CLI)
3. β
**Add GitHub Secret**
- Name: `FIREBASE_SERVICE_ACCOUNT`
- Value:
- Go to **Firebase Console** β Project Settings β **Service Accounts**
- Click **"Generate new private key"**
- Copy entire JSON content and use it as the secret value
4. β
**Commit and Push**
Once pushed, deployment will be triggered **automatically** π
The version will follow **semantic versioning (semver)** automatically.
5. β
**Open Your Firebase Hosting URL**
Boom π₯ β your website is **live and accessible online**!
## π» Local Environment Experience
After Orchetera setup is done:
- β
**VS Code** will automatically open the newly created project folder
- β
A browser tab will open pointing to the **auto-generated local port**
(no port conflict β each project uses a random, safe port)
Now you can **code, push, and boom!**
Build your app as easily as flipping your hand βπ
## β€οΈ Powered by Orchetera
> "Let the tools play the symphony for you."