This system has the following tech stack:
React and React Native interface with Laravel through APIs. The endpoints are to be specified.
Important: Client and Server have the best chance of working if they have the same domain.
If the server is hosted, i.e. php artisan serve --host 0.0.0.0
, then the client must be served with the same IP address as well.
As such, the entries SESSION_DOMAIN
and SANCTUM_STATEFUL_DOMAINS
in server/.env
must point to the IP address or domain name of the client.
.env.example
file to .env
composer update
composer install
php artisan key:generate
php artisan migrate
npm run dev
or npm run build
php artisan serve
php artisan serve --host 0.0.0.0
On Linux, other ports may not be able to be forwarded, so try this instead
sudo php artisan serve --host 0.0.0.0 --port=80
The mobile portion of this application is handled with Expo.
Source files are located in the app/
folder. Expo Router is a file-based routing system, so its structure must be followed.
npm i -D
extra/API_URL
entry in the mobile/app.json
file.npm run start
or npm run android
to develop
npm run android
.cd
to mobile/
eas build --profile preview --platform android
mobile/package-lock.json
Try connecting through tunnel instead of LAN. Note: It may be slower to connect, so it is not recommended to use. See this StackOverflow question
npm i @expo/ngrok
ngrok http 3000
(Run this in another terminal window)npx expo start --tunnel