CogniKids is revolutionizing family playtime by combining neuroscience, mental health, and child development with advanced technology. Our AI agent offers personalized, interactive play experiences that adapt in real-time to your family's needs, using everyday items for sustainable fun.
Before setting up the project, ensure you have the following core dependencies installed globally:
- Node.js -
v20.14.0
Download Node.js - NPM -
v10.9.0
Learn about NPM - Firebase CLI Get Firebase CLI
- Expo CLI Install Expo CLI
Important
Log in to All Required CLIs
- Firebase CLI: Log in to your Firebase account to ensure access to Firebase services and emulators.
- Expo CLI: Log in with your Expo account to access development builds and deployment features.
Verify Project Access for Each CLI
- Make sure your Firebase and Expo accounts have the required permissions for this project. Lack of access can prevent essential functionalities like running emulators or deploying functions.
Node Version Compatibility
- Confirm your Node.js version is compatible (v20.14.0) to avoid issues with dependencies and ensure stable project performance.
Below is the organized structure of the project files and directories with sorted descriptions for each:
|
βββ π .github # GitHub workflows, issue, and PR templates
βββ π app # React Native mobile app code
βββ π flows # Firebase genkit flows
βββ π functions # Firebase functions code
βββ π media # README media
βββ π .firebaserc # Firebase configuration file
βββ π .gitignore
βββ π biome.json # Code lint and format config
βββ π firebase.json # Firebase service config
βββ π firestore.indexes.json # Firestore index definitions
βββ π firestore.rules # Firestore security rules
βββ π LICENSE
βββ π README.md # Project overview and setup
|
Thank you for contributing! Please follow these guidelines:
Tip
-
Commit Message Format:
Use Semantic Commit Messages:<type>(<scope>): <subject>
- Examples:
- Feature:
feat(auth): add user login functionality
- Bug Fix:
fix(api): resolve 500 error on user creation
- Feature:
- Examples:
-
Pull Request Title Format:
Follow the same format as commit messages:<type>(<scope>): <subject>
- Examples:
- Feature:
feat(auth): implement OAuth2 authentication
- Bug Fix:
fix(ui): correct layout issue in user profile
- Feature:
- Examples:
-
Code Linting and Formatting:
Before submitting, run:npm run lint npm run format
This ensures your code meets our standards.
-
Documentation:
Please write documentation for your code changes in both the code (using comments) and markdown files to enhance clarity and maintainability.
Warning
-
Semantic Pull Request Title is Mandatory: Using a semantic title helps GitHub Actions categorize and label PRs automatically, which also aids in generating release notes.
-
Separate Pull Requests for Different Scopes: Please try to open separate PRs for different scopes. This keeps changes organized and easier to review.
Note
-
No Direct Push to
main
Branch: Direct pushes to the main branch are not allowed to ensure code integrity. -
Create a Sub-Branch: Always create a new branch from the
main
branch for your changes. This keeps your work organized. -
Make Your Changes: Implement your changes in the newly created branch.
-
Open a Pull Request (PR): Open a PR following the established rules (semantic title, etc.).
-
GitHub Actions Trigger:
- A comment will be created with instructions on how to check out the branch locally.
- Automatic labeling will be applied based on the PR title.
- The code linting and style workflow will run to check your code quality.
- If you make changes to the app, Expo updates will be triggered automatically, allowing maintainers to preview those changes using a development build.
- An Expo comment will include a QR code, so thereβs no need to search for the updated build. Scan the QR code to access the latest version quickly.
Set up and run the project locally by following each step carefully.
-
Repository URL:
[email protected]:amosproj/amos2024ws04-personalized-play.git
-
Commands:
git clone [email protected]:amosproj/amos2024ws04-personalized-play.git cd amos2024ws04-personalized-play
Copy example environment files to configure your environment.
-
Commands:
cp .env.example .env
- Repeat this command in directories like
flows
,functions
, andapp
if they have their own.env.example
files. - Customize each
.env
file as necessary for your local setup.
- Repeat this command in directories like
Navigate to each directory (flows
, functions
, and app
) and install dependencies.
-
Command:
npm install
To test the mobile interface, download the Expo Developer build from Expo.dev.
Each component has specific commands to start in development mode. Follow these steps:
-
Command (from the
flows
directory):npm run dev
This initiates real-time compilation for Firebase Genkit flows, ideal during active development.
-
Production Option:
npm run build
Use this command to build flows without real-time updates if youβre not actively developing.
-
Command (from the
functions
directory):npm run dev
Runs Firebase functions in development mode, applying code changes immediately.
-
Production Option:
npm run build
Use this command to build functions for a stable production environment.
To emulate Firebase services locally, initiate the emulators.
-
Command (from the root directory):
GENKIT_ENV=dev firebase emulators:start --inspect-functions
This command launches Firebase emulators, allowing you to test backend services locally without cloud deployment.
From the flows
directory, launch the Genkit Developer UI.
-
Command:
npm run genkit:start
This provides a visual interface for managing and testing flows, ideal for quickly validating your configurations.
To view the project on a mobile device, start the Expo server from the app
directory.
-
Command:
npm run dev
This will start the Expo development server, enabling real-time updates on a connected device (e.g., Android emulator or physical device).
Creating with β€οΈ CogniKids