Giter Club home page Giter Club logo

star-chart's Introduction

star-chart

Star chart web app - a scheduling platform for administrators.

Completed as part of the UC Berkeley coding bootcamp.

Description

As a scheduling administrator for a large organization, I would like to have access to a scheduling app that is scalable and dynamic, with views that can provide specific information about individual users and their associated events.

Appointments are created using an "administrator" view, with queries and mutations provided from graphql, and data hosted by MongoDB. Once created, events or appointments can be visualized on a per-user basis.

The Star Chart web app provides scalability via a MongoDB backend, with customized views in a single page application using React, and a dynamic viewing experience through Semantic UI styling.

Table of Contents

Project Links

Installation

To install, first clone the repo:

git clone [email protected]:TottoMoe/star-chart.git

Next, navigate to the cloned repo and install both the server and client for development from the command line (assumes npm is installed):

npm install

Seed the database so that the app has date to view from the frontend:

npm run seed

The app is now ready for local development.

Usage

After installation, you can start a local instance of the app by starting the server and client concurrently:

npm run develop

Navigate to the localhost route to view the app using your browser at http://localhost:3000/

Contributors

Demo

Once the user is logged in, examples of the application and the associated pages are as follows:

User page - the view for a single user and associated events:

View all users that have logged into the application:

View all events defined in the application:

View a single event for the application:

Questions

For additional questions, please visit the repo on GitHub.

star-chart's People

Contributors

ryan-whit avatar reyes-jose avatar tottomoe avatar johnaslani avatar dalebungay avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

mark-carlson

star-chart's Issues

Create the "User" view

When I click on a scheduler/admin (currently uses the User model), then I want to go to a new page that displays that admin's already scheduled events.

This issue addresses the minimum features needed for the "User" view from the wireframe, it is not intended to be the finished layout, but merely demonstrate the initial connection.

User Query

  • Create a frontend query with graphql that passes back a single user and all of their associated events/meetings/appointments
    • This was completed in #35

This should be placed in client/src/utils/queries.js

EventList component

  • Add a frontend component that will be used to return a list of Events to other pages

New file should go in client/src/components/EventList/

See here for an example: https://github.com/TottoMoe/star-chart/blob/main/client/src/pages/HomePage.js

The EventList/index.js file will reference the Event model and associated fields from start-chart:

UserPage

  • Create a new page title "UserPage" that will be used to display the User's information and associated Events.

The "Home" route currently has some of this layout; however, that is a static route, and we need to make a dynamic route that is specific to each User.

It is suggested that the "HomePage.js" file is copied into a new file and simplified for testing the connection.

An example of how this is used:

The "ThoughtList" from that page would be our "EventList", so something like this:

import React from 'react';
import { useQuery } from '@apollo/client';

import EventList from '../components/EventList';

import { QUERY_USER } from '../utils/queries';

const UserPage = () => {
  const { loading, data } = useQuery(QUERY_USER); // This is likely not correct (see next section in this Issue)
  const events = data?.events || [];

  return (
    <main>
      <div className="flex-row justify-center">

        <div className="col-12 col-md-8 mb-3">
          {loading ? (
            <div>Loading...</div>
          ) : (
            <EventList
              events={events}
              title="Your list of appointments."
            />
          )}
        </div>
      </div>
    </main>
  );
};

export default UserPage;

Make the UserPage dynamic

We want to dynamically pass an ID of the user so that the user page displays only the appoinments/events for a given user. @ryan-whit is not quite sure how to do this, but he thinks it is by added a useParams hook, similar to this line:

https://ucb.bootcampcontent.com/UCB-Coding-Bootcamp/UCB-VIRT-FSF-PT-05-2022-U-LOLC/-/blob/main/21-MERN/01-Activities/20-Stu_React-Router/Solved/client/src/pages/SingleThought.js#L14

  • Add the userId parameter via useParams hook to the UserPage to make the page dynamic

Add Route to ContainerPage

The last piece of the puzzle is to add a Route to the ContainerPage:

The modified page should likely look something like this:

export default function ContainerPage(){
    return(
        <div>
            <NavBar/>
            <div className="container">
            <Routes>
                <Route path="/Home" element={<HomePage/>}/>
                <Route path="/Login" element={<LoginForm/>}/>
                <Route path="/events/:eventId" element={<SingleEvent/>}/>
                <Route path="/users/:userId" element={<UserPage/>}/>
            </Routes>
            </div>
            <Footer/>
        </div>
    );
}

Generate Create meeting page

Create a page that users can create a new meeting or multiple appointments at the same time by having the following attributes
Start time
End time
Duration
Number of meetings
Gap time between meetings

Initial Scoping

Star Chart!

Initial scoping:

  • Define Model (write out object contents. What do we need? Relationships?)
  • Implement models (mongoose setup)
  • Determine if react-calendar fits our purposes by prototyping something
  • Start working on the wireframe
  • Start working on CRUD/REST routes with mongoose/graphql
  • Database seeds for our models
  • React frontend connected to the routes
  • Look at integrating a CSS framework with
  • JWT for sign-in and auth

Define models

  • Jenny and Clarence (with help from John)

Connecting the user story and requirements to the Model definitions

React Calendar

  • Ryan

Wireframing

  • Jose and John - connect user story to the "pages"

convert the models/User.js/User model to an array

Currently the User model is not referencing an array of Events. Convert this to an array.

Current definition:

    createdEvents: {
      type: Schema.Types.ObjectId,
      ref: "Event",
    },

We want createdEvents to be an array of the Event Model.

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.