|
| 1 | +# 🧩 React Native GraphQL To-Do App |
| 2 | + |
| 3 | +A ✨ full-stack mobile To-Do app ✨ built with **React Native**, **GraphQL**, **Apollo**, **PostgreSQL**, and more! It's fast, clean, and developer-friendly — perfect for learning or launching 🚀. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 🔧 Tech Stack Toolbox 🧰 |
| 8 | + |
| 9 | +### 🖼️ Frontend |
| 10 | + |
| 11 | +* ⚛️ React Native `0.79.4` |
| 12 | +* 🚀 Expo SDK `53` |
| 13 | +* 🔗 Apollo Client |
| 14 | +* 💅 NativeWind (TailwindCSS for RN) |
| 15 | +* 🎭 Reanimated for slick animations |
| 16 | +* 🧱 GlueStack UI (optional) |
| 17 | + |
| 18 | +### 🔙 Backend |
| 19 | + |
| 20 | +* 🟢 Node.js + Express |
| 21 | +* 📡 Apollo Server |
| 22 | +* 🔍 GraphQL (Schema + Resolvers) |
| 23 | +* 🔄 Prisma ORM |
| 24 | +* 🛢️ PostgreSQL |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## 🚀 Getting Started |
| 29 | + |
| 30 | +### 🗂️ Folder Structure |
| 31 | + |
| 32 | +``` |
| 33 | +react-native-graphql-app/ |
| 34 | +├── frontend/ # 📱 Mobile client |
| 35 | +│ ├── App.js |
| 36 | +│ ├── apollo/ # Apollo config |
| 37 | +│ ├── components/ # Reusable UI |
| 38 | +├── server/ # 🔧 Node GraphQL API |
| 39 | +│ ├── src/ |
| 40 | +│ ├── prisma/ # DB schema & migrations |
| 41 | +└── README.md |
| 42 | +``` |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## 🔄 Quickstart Guide |
| 47 | + |
| 48 | +### 📥 1. Clone the Repo |
| 49 | + |
| 50 | +```bash |
| 51 | +git clone https://github.com/dmunasingha/react-native-graphql-app.git |
| 52 | +cd react-native-graphql-app |
| 53 | +``` |
| 54 | + |
| 55 | +### 🧠 2. Backend Setup |
| 56 | + |
| 57 | +```bash |
| 58 | +cd server |
| 59 | +cp .env.example .env |
| 60 | +npm install |
| 61 | +npx prisma migrate dev --name init |
| 62 | +npm run dev |
| 63 | +``` |
| 64 | + |
| 65 | +🔗 GraphQL Playground: `http://localhost:4000/graphql` |
| 66 | + |
| 67 | +### 📲 3. Frontend Setup |
| 68 | + |
| 69 | +```bash |
| 70 | +cd ../frontend |
| 71 | +npm install |
| 72 | +npm start |
| 73 | +``` |
| 74 | + |
| 75 | +💡 Tip: Use Expo Go or an emulator for testing |
| 76 | + |
| 77 | +> ⚠️ **Important:** Update Apollo client URI in `apollo/client.js`: |
| 78 | +
|
| 79 | +```js |
| 80 | +uri: 'http://192.168.x.x:4000/graphql' // 👈 Use your LAN IP |
| 81 | +``` |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## 🎯 Features Checklist |
| 86 | + |
| 87 | +* ✅ Add / Toggle / Delete todos |
| 88 | +* 🔁 Auto refetch with Apollo |
| 89 | +* ✨ Beautiful styling with Tailwind |
| 90 | +* 📲 Cross-platform (iOS/Android) |
| 91 | +* 🔄 Prisma-backed DB |
| 92 | +* ⏱️ Coming Soon: Offline mode |
| 93 | +* 🌓 Coming Soon: Dark mode |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## 📸 Screenshots |
| 98 | + |
| 99 | +| 📋 List View | 🛠️ Mutation Example | |
| 100 | +| ------------- | -------------------- | |
| 101 | +| *Coming soon* | *Coming soon* | |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## 🧪 Dev Tips |
| 106 | + |
| 107 | +* 🧹 Clear Metro cache: `npx expo start -c` |
| 108 | +* 🧬 Test GraphQL at: `http://localhost:4000/graphql` |
| 109 | +* 🧑🔬 Use `npx prisma studio` to view data |
| 110 | + |
| 111 | +--- |
| 112 | + |
| 113 | +## 🧨 Troubleshooting |
| 114 | + |
| 115 | +* ❌ **Network request failed:** Use your real IP, not `localhost` |
| 116 | +* ❌ **Unknown type "ID":** Match GraphQL types (use `Int!` if Prisma expects it) |
| 117 | +* ❌ **Metro error:** All `import` statements must be at the top level |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## 📄 License |
| 122 | + |
| 123 | +🪪 Licensed under the **0BSD** license — totally open and flexible 💖 |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +## 💡 Acknowledgements |
| 128 | + |
| 129 | +* 🚀 [Apollo GraphQL](https://www.apollographql.com/) |
| 130 | +* 🧬 [Prisma](https://www.prisma.io/) |
| 131 | +* 📦 [Expo](https://expo.dev/) |
| 132 | +* 🎨 [GlueStack UI](https://ui.gluestack.io/) |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +## 🙋♂️ Contact |
| 137 | + |
| 138 | +Made with ❤️ by Dunith Munasingha |
| 139 | +📧 munasingha.dunith@gmail.com(mailto:munasingha.dunith@gmail.com) |
| 140 | +🌐 https://www.linkedin.com/in/dunith-munasingha/ |
0 commit comments