Git Product home page Git Product logo

scheduler's Introduction

Interview Scheduler

The Interview Scheduler is a responsive single-page web app designed using React for scheduling interview appointments. It does not include user account management but manages scheduling information in a database and updates schedules for multiple users through WebSockets.

Technologies used include React, SASS, WebPack, Babel, Axios client-side, Node.js, Express, WebSockets, Postgres server-side, and Storybook, Testing Library, WebPack Dev Server, Jest, and Cypress for development and testing.

Interview Scheduler is not suitable for real-world production use and is only for demonstration and educational purposes.

Screenshots

Table of Contents

Development

Directory Structure

The project directory is arranged as follows:

./                 Main project repository
./docs             Project documentation
./public           Static files served to the client, including manifest.json
./public/images    Static images used on the site
./src              Project source code
./src/__mocks__    Axios mocks
./src/components   React components
./src/hooks        React hooks
./src/helpers      Helper functions
./src/reducers     Application reducer function
./src/styles       SASS styles
./cypress          Cypress testing fixtures and tests, etc
./stories          Storybook component stories

Do not edit or push to repo:

./node_modules     Node.js packages
./coverage         Jest code coverage results

Dependencies

Interview Scheduler requires Node.js and Postgres and the following NPM packages are used:

Development Dependencies

The following NPM packages are used for development:

Support Setup

Install Node.js from your package manager, or download binaries (for fun) or source code (for maximum fun).

Install Postgres.

Database/API Server Setup

Execute the following to set up Interview Scheduler API server:

cd <project-directory>
git clone https://github.com/d0ugr/scheduler-api
cd scheduler-api
npm install

Log into Postgres as a user with superuser privileges. For example:

sudo -u postgres psql

Client Setup

Execute the following to set up Interview Scheduler:

cd <project-directory>
git clone https://github.com/d0ugr/scheduler
cd scheduler
npm install

Create the file <project-directory>/scheduler/.env.development with the following:

REACT_APP_WEBSOCKET_URL=ws://localhost:8001
PORT=8000
CHOKIDAR_USEPOLLING=false

Running Webpack Development Server

cd <project-directory>/scheduler
npm start

Testing

Database Setup

Log into Postgres as a user with superuser privileges. For example:

sudo -u postgres psql

Execute the following to set up the test database and populate it with data:

CREATE USER scheduler_test WITH NOSUPERUSER PASSWORD 'test';
CREATE DATABASE scheduler_test OWNER scheduler_test;
GRANT ALL ON DATABASE scheduler_test TO scheduler_test;
\c scheduler_test
\i src/db/schema/create.sql
\i src/db/schema/test.sql
-- Use this to verify the data:
SELECT * FROM days JOIN appointments ON appointments.day_id = days.id;

API Server Setup

Create API server test environment file:

<project-directory>/scheduler-api/.env.test

PGHOST=localhost
PGUSER=scheduler_test
PGDATABASE=scheduler_test
PGPASSWORD=test
PGPORT=5432

Run the API server in test mode:

cd <project-directory>/scheduler-api
npm run test:server

Client Setup

Create client test environment file:

<project-directory>/scheduler/.env.test

REACT_APP_WEBSOCKET_URL=ws://localhost:8001
PORT=8000
CHOKIDAR_USEPOLLING=false

Running Jest Test Framework

cd <project-directory>/scheduler
npm test

Running Cypress Test Framework

Make sure you're running the API server in test mode with the appropriate data.

cd <project-directory>/scheduler
npm run cypress

Click "Run all specs" or select individual specs from the Tests pane in the Cypress window.

scheduler's People

Contributors

dialop avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.