Babyweeks is a React app designed to help users track their baby's development milestones by calculating the number of weeks since a given birthdate. It started back in 2021 using PyScript and transitioned to React in early 2025. The app is hosted on GitHub Pages.
- Input a birthdate to calculate the weeks since birth.
- View developmental milestones content for a baby's first year.
Follow these steps to set up and run the app on your local machine:
- Node.js (16.x or later) and npm installed.
git clone https://github.com/ntemposd/babyweeks.git
cd babyweeksRun the following command to install all required dependencies:
npm installTo start the app in development mode:
npm start- Open your browser and navigate to
http://localhost:3000. - The app will reload automatically as you make changes to the source code.
The app is automatically deployed to GitHub Pages from the babyweeks-react branch using GitHub Actions.
Visit the deployed app at:
https://ntemposd.github.io/babyweeks
If you need to deploy manually:
- Build the app:
npm run build
- Deploy to GitHub Pages:
npm run deploy
- Develop on feature branches based off
main:- git checkout -b feature/some-feature
- make changes, commit, push, open a Pull Request to
main.
- Merge into
mainonly after review and CI checks pass. - The GitHub Actions workflow (./github/workflows/deploy.yml) runs on pushes to
mainand builds + deploys the production bundle to thegh-pagesbranch automatically. - Do NOT edit
gh-pagesdirectly under normal development β it is the generated deployment artifact. Editing it directly is risky and may be overwritten by the automatic deploy. - Emergency hotfix: if you must update the deployed site immediately, create a build locally (
npm run build) and deploy with thedeployscript (npm run deploy) or carefully push a tested change tomainso the workflow publishes it.
Notes
- Local dev: the app uses
BrowserRouter basename="/babyweeks". When runningnpm startopen:- http://localhost:3000/babyweeks/
- or temporarily remove/adjust the
basenamein src/App.js for convenience.
- This keeps source-of-truth in
mainand leavesgh-pagesas the safe deployment branch.
.
βββ public/ # Public assets
βββ src/ # Source code
β βββ App.js # Main application component
β βββ App.css # Global styles
β βββ assets/ # Images and JSON data
β βββ components/ # Reusable components (if applicable)
βββ .github/ # GitHub workflows
β βββ workflows/
β βββ deploy.yml # Deployment configuration
βββ package.json # Project metadata and scripts
- React: Front-end framework.
- Bootstrap: For responsive and modern styling.
- DatePicker: Custom date input component.
- GitHub Pages: Deployment platform.
- GitHub Actions: CI/CD workflow for automatic deployment.
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Add new feature" - Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you encounter issues:
- Ensure all dependencies are installed by running
npm install. - Verify that your Node.js version is compatible with the app.
- Check the browser console for error messages.
- Reach out by opening an issue in the repository.