NateCross / comelec-system

0 stars 1 forks source link

E-Voting System

This system has the following tech stack:

React and React Native interface with Laravel through APIs. The endpoints are to be specified.

Setup

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.

Server

Serving over LAN

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

Mobile

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.

Build for Mobile

In case build doesn't work

In case Expo Go doesn't connect

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