https://github.com/suryapratap64/assignment-native
Assignment-React-Native
https://github.com/suryapratap64/assignment-native
appolo-client appolo-server jsonwebtoken native postgresql prisma socket-io sql typescript zustand zustand-state-management
Last synced: 3 months ago
JSON representation
Assignment-React-Native
- Host: GitHub
- URL: https://github.com/suryapratap64/assignment-native
- Owner: suryapratap64
- Created: 2025-07-01T16:35:23.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-01T17:10:39.000Z (3 months ago)
- Last Synced: 2025-07-01T18:23:59.005Z (3 months ago)
- Topics: appolo-client, appolo-server, jsonwebtoken, native, postgresql, prisma, socket-io, sql, typescript, zustand, zustand-state-management
- Language: TypeScript
- Homepage:
- Size: 31.3 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
1->backend
Create a backend folder to organize server-side code.Initialize npm project with npm init -y.
Install TypeScript and dev tools (typescript, ts-node-dev, @types/node).
Install runtime libraries:
Express for HTTP server
Apollo Server Express to handle GraphQL APIs
GraphQL as the query language
Prisma ORM and @prisma/client to connect to PostgreSQL
Socket.IO for real-time updates
jsonwebtoken and bcrypt for authentication and password hashing
Install type definitions for TypeScript compatibility (@types/jsonwebtoken, @types/bcrypt, @types/express).
Use Prisma to define database models like:
User (stores user data)
Event (stores event details and status)
Create resolvers to manage:
Adding new users
Logging in users
Adding/listing/updating events
Use Socket.IO to send real-time notifications when:
New events are added
Event status changes
Use Apollo Server with Express to expose GraphQL APIs.
Manage database connections and migrations with Prisma CLI commands
//frontend
Create a new React Native app using Expo for fast development.
Install libraries:
@apollo/client and graphql to interact with the backend GraphQL APIs
Zustand for lightweight global state management (e.g., store auth token)
Build three main screens:
Login Screen: user enters email and password to get JWT token
Event List Screen: displays events fetched from backend
Event Detail Screen: shows detailed info about a selected event
Use Apollo Client to send queries and mutations to the backend.
Store the authentication token securely using Zustand.
Listen for real-time updates (e.g., event status change) using Socket.IO.