This project is a timekeeping mobile app designed for employees. It enables users to clock in and out seamlessly, ensuring accurate tracking of work hours. Both employers and employees can access time records, while employers also have the ability to send hiring requests directly through the app.
Clone the repository:
git clone https://github.com/Yui1002/timebox
cd timebox-
Install dependencies:
cd clinclon_server npm install -
Set up configuration:
Create a
.envfile in theclinclon_serverdirectory and add the necessary environment variables:DB_NAME=your_db_name DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=your_db_host DB_PORT=your_db_port
-
Install dependencies:
cd mobile npm install -
Set up configuration:
Create the config.js file in the mobile directory with the appropriate backend URL and password rules:
export const LOCAL_HOST_URL = `YOUR_LOCAL_HOST_URL`
export const PASSWORD_RULES = {
minLength: 8,
minLowercase: 1,
minUppercase: 1,
minNumbers: 1,
minSymbols: 0,
};-
Set up React Native environment:
Follow the React Native CLI Quickstart guide to set up the development environment for React Native.
-
Create the database:
Connect to your PostgreSQL server and create the database:
CREATE DATABASE your_db_name;
-
Import the schema using CLI:
Use the following command to import the
schema.sqlfile into your PostgreSQL database:psql -h your_db_host -U your_db_user -d your_db_name -f /path/to/clinclon_server/schema.sql
Replace
/path/to/clinclon_server/schema.sqlwith the actual path to theschema.sqlfile.You will be prompted to enter the password for the database user.
-
Generate OpenAPI specification and routes:
npm run build npm run routes-gen npm run swagger-gen
-
Start the backend server:
npm start
The server will start on
YOUR_LOCAL_HOST_URL.
-
Navigate to the mobile directory:
cd mobile -
Start the React Native development server:
npm start
-
Run the app on an Android emulator or device:
npm run android
-
Run the app on an iOS simulator or device:
npm run ios