Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Version Check

on:
pull_request:
branches: [master]

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get PR version
id: pr_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Get base branch version
id: base_version
run: |
git fetch origin ${{ github.base_ref }}
BASE_VERSION=$(git show origin/${{ github.base_ref }}:package.json | node -p "JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')).version")
echo "version=$BASE_VERSION" >> $GITHUB_OUTPUT

- name: Compare versions
run: |
PR="${{ steps.pr_version.outputs.version }}"
BASE="${{ steps.base_version.outputs.version }}"
echo "Base (main): $BASE"
echo "PR: $PR"

node -e "
const semver = (v) => v.split('.').map(Number);
const [bM, bm, bp] = semver('$BASE');
const [pM, pm, pp] = semver('$PR');
const isHigher =
pM > bM ||
(pM === bM && pm > bm) ||
(pM === bM && pm === bm && pp > bp);
if (!isHigher) {
console.error('Version must be bumped. Run npm run bump:patch/minor/major before pushing.');
process.exit(1);
}
console.log('Version bump detected. OK.');
"
68 changes: 40 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
# Minimal Template
# Simple Notepad

This is a [React Native](https://reactnative.dev/) project built with [Expo](https://expo.dev/) and [React Native Reusables](https://reactnativereusables.com).
A lightweight cross-platform notes and checklist app built with [React Native](https://reactnative.dev/) and [Expo](https://expo.dev/). Create, manage, and organize your notes and checklists with persistent local storage via SQLite.

It was initialized using the following command:
## Features

```bash
npx @react-native-reusables/cli@latest init -t simple-notepad
```
- ✍️ Create and edit notes with a clean, intuitive interface
- ☑️ Create and manage checklist items with check/uncheck functionality
- 💾 All data persisted locally in SQLite database
- 🎨 Responsive UI powered by Tailwind CSS via NativeWind
- 📱 Runs seamlessly on iOS, Android, and Web
- 🔥 Edge-to-Edge display support

## Getting Started

To run the development server:
### Running the App

Start the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
npm run dev
```

This will start the Expo Dev Server. Open the app in:
Then open the app in your preferred platform:

- **iOS**: press `i` to launch in the iOS simulator _(Mac only)_
- **Android**: press `a` to launch in the Android emulator
- **Web**: press `w` to run in a browser

You can also scan the QR code using the [Expo Go](https://expo.dev/go) app on your device. This project fully supports running in Expo Go for quick testing on physical devices.
Alternatively, you can scan the QR code using the [Expo Go](https://expo.dev/go) app on your physical device.

### Available Scripts

From `package.json`:

```bash
npm run dev # Start development server
npm run android # Build and run on Android
npm run prebuild # Generate native projects
npm run test-watch # Run tests in watch mode
npm run test-ci # Run tests (CI mode)
npm run clean # Clean build artifacts and dependencies
npm run bump:patch # Bump patch version
npm run bump:minor # Bump minor version
npm run bump:major # Bump major version
```

## Adding components

Expand All @@ -51,23 +66,20 @@ If you don't specify any component names, you'll be prompted to select which com
- 🔥 Edge to Edge enabled
- 📱 Runs on iOS, Android, and Web

## Architecture

- **Routing**: File-based routing with [Expo Router](https://expo.dev/router) under `app/` directory
- **Storage**: Local SQLite database via `expo-sqlite` with automated migrations
- **State Management**: React hooks and component state
- **Data Layer**: Centralized CRUD helpers in `lib/dataStorage.ts`

## Learn More

To dive deeper into the technologies used:

- [React Native Docs](https://reactnative.dev/docs/getting-started)
- [Expo Docs](https://docs.expo.dev/)
- [Expo Router Guide](https://expo.dev/router)
- [Nativewind Docs](https://www.nativewind.dev/)
- [React Native Reusables](https://reactnativereusables.com)

## Deploy with EAS

The easiest way to deploy your app is with [Expo Application Services (EAS)](https://expo.dev/eas).

- [EAS Build](https://docs.expo.dev/build/introduction/)
- [EAS Updates](https://docs.expo.dev/eas-update/introduction/)
- [EAS Submit](https://docs.expo.dev/submit/introduction/)

---

If you enjoy using React Native Reusables, please consider giving it a ⭐ on [GitHub](https://github.com/founded-labs/react-native-reusables). Your support means a lot!
- [SQLite with Expo](https://docs.expo.dev/versions/latest/sdk/sqlite/)
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "simple-notepad",
"slug": "simple-notepad",
"version": "1.2.0",
"version": "1.2.1",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "simple-notepad",
Expand All @@ -25,7 +25,7 @@
"backgroundColor": "#ffffff"
},
"package": "com.pgarr.simplenotepad",
"versionCode": 14
"versionCode": 15
},
"web": {
"bundler": "metro",
Expand All @@ -44,7 +44,7 @@
"projectId": "9e3820b7-558b-4bd2-a1b2-e49561e741e6"
}
},
"runtimeVersion": "1.2.0",
"runtimeVersion": "1.2.1",
"updates": {
"url": "https://u.expo.dev/9e3820b7-558b-4bd2-a1b2-e49561e741e6"
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"name": "simple-notepad",
"main": "expo-router/entry",
"version": "1.2.0",
"version": "1.2.1",
"scripts": {
"prebuild": "expo prebuild --clean",
"dev": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo run:web",
"test-watch": "jest --watchAll",
"test-ci": "jest --no-watchman --runInBand",
"clean": "rm -rf .expo node_modules",
Expand Down
Loading