Welcome to my final project for the upLeveled bootcamp!
This is a mobile alarm app made with expo/react native for the front end and next.js for the backend.
- Start frontend in
expo-app
:yarn start
orexpo start
(or when connecting to a device via USB: run locally withexpo start --localhost
) - Start backend in
next-backend
:yarn dev
- Login or create an account (creates session token, so you stay logged in)
- Set an alarm (it calculates the time left until it rings)
- Edit alarm time once it is set
- Stop alarm by scanning almost any QR or barcode
- React Native with Expo
- PostgreSQL
-
Prototype:
- Figma
- DrawSQL
-
Main Expo features used:
- Barcode Scanner
- Notifications
- Audio
- Vector Icons
-
Main external libraries for frontend:
- use-react-countdown
-
Main external libraries for backend:
- postgres
- dotenv-safe
- cookie & js-cookie
- node:crypto (to create random token)
- bcrypt (to encrypt password)
There are two options: one is to use the debugging features already on your machine (differs a little bit with each emulator), or using the React Native Debugger (recommended!)
Docs: https://docs.expo.dev/workflow/debugging/
-
Download setup file for windows (used here: react_native_debugger-0.12.1-setup.exe) here: https://github.com/jhen0409/react-native-debugger/releases
-
Specify port (shortcuts:
Command+T
on macOS,Ctrl+T
on Linux/Windows) --> 19000 -
start frontend server
yarn start
/yarn start --localhost
(USB-connection) --> reload application if needed -
Right Click > Enable Network Inspect
-
(IF THE DEVTOOLS SHOW AN ERROR MESSAGE)
- Add a resolution into
expo-app
package.json, matching the version number of the Debugger (Written next to DevTools):
"resolutions": {
"react-devtools-core": "4.14.0"
}
- run
yarn
- Type
$r
in the console to see the breakdown of your selected element.
Gives less options, e.g. misses the Network Inspection and does not show the tree
- Shake phone
- Select
Debug Remote JS
- Open: http://localhost:19002/
- To access the react native debugger: Open http://localhost:19000/debugger-ui/
- Inspect
- press
a
in your running frontend server - press
ctrl
+m
or runadb shell input keyevent 82
in your terminal window. - Select
Debug Remote JS
- Open: http://localhost:19002/
- for more information options access:
- Open http://localhost:19000/debugger-ui/
- Right click > inspect