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
├── 📁 backend # Firebase functions and genkit flows
├── 📁 media # README media
├── 📄 .gitignore
├── 📄 biome.json # Code lint and format config
├── 📄 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
backend
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 (backend
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
backend
directory):npm run dev
This command starts all required processes, including:
-
Real-time compilation for Firebase Genkit flows.
-
Firebase functions in development mode with immediate application of code changes.
-
Firebase emulators to test backend services locally.
-
The Genkit Developer UI for managing and testing flows.
-
Production Option:
npm run build
Use this command to build the backend without real-time updates if you’re not actively developing.
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