This is a Fullstack application using Typescript in NodeJS for the BE, NextJS for FE and React Native for mobile. It let's you login through OAuth using your github account and upload pictures and videos to a time-line based UI.
- Connect to an external storage system
- Add better error handling
- Better configuration on backend to work simultaneously with web and mobile app
- Better configuration on mobile app so it does not depend on your specific IP address
To run this project locally, you will need to do the following steps in the project root directory, depending if you want to run it on web or mobile. The processes are different because when using expo for hosting this app locally, we don't have access to http://localhost:PORT. Therefore you will need to create and change both GITHUB_CLIENT_ID
and GITHUB_CLIENT_SECRET
when swaping FE clients.
- Run
npm install
- Add environment variables to a .env file as suggested in the
.env.example
file
2.1 Create a github oauth app for web only at https://github.com/settings/developers and store bothGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
2.2 Insert both values in aserver/.env
file (comment the mobile values if you did that first)
2.3 Add theGITHUB_CLIENT_ID
string toweb-app/.env.local
, with a prefix, like soNEXT_PUBLIC_GITHUB_CLIENT_ID
, as exemplified in.env.local.example
- Run
npx prisma migrate dev
on the server root directory - Run
npm run dev
both on the server and web-app root directory - Access
http://localhost:3000/
on your browser
- Run
npm install
- Add environment variables to a .env file as suggested in the
.env.example
file
2.1 Create a github oauth app for mobile only at https://github.com/settings/developers and store bothGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
.
2.1.1 When creating this app, set the Homepage URL tohttp://localhost:3000
and Authorization callback URL toexp://<your ip address>:19000
2.2 Insert both values in aserver/.env
file (comment the web values if you did that first)
2.3 Add theGITHUB_CLIENT_ID
string to cofiguration object of the useAuthRequest function, under theclientId
key inapp/index.tsx
file - Add your ip address to
lib/api.ts
- Run
npx prisma migrate dev
on the server root directory - Run
npm run dev
on the server root direrctory - Run
npm run start
on the mobile-app root direrctory - Access the Expo app on your mobile & scan the QR code displayed on the terminal. Make sure you are in the same wi-fi network as your local machine.