team-beluga's Issues
BE: Availability Controllers GET /availability
Create a route that:
- Loads availability for given day (GET /availability?day=2342343243)
- Returns a list of available slots
Google Calendar API
- /freeBusy timeMin, timeMax
Each date you select, it’ll load the appointment slots available
[
{start_time: 2323234, end_time: 234234},
{start_time: 2323234, end_time: 234234},
{start_time: 2323234, end_time: 234234},
...
]
FE: Create alert context
Use Material UI Snackbar on success or error with desired message.
We want to be able to use a function like:
showMessage(messageString, messageType)
For example:
showMessage("Login Failed", "error")
showMessage("Event type created successfully", "success")
BE: Appointment Controllers
- CREATE /appointment -> Create an appointment
- meeting_id, name, email, time (datetime), timezone
- GET /appointments -> list of appointments for logged in user
BE: Set up DB
Set up postgres connection on server
FE: Set up user context
- On every protected route visit, check that cookie is valid and update user
BE: Modify User Creation route
on Creation of user, create an initial Meeting for a 60 min duration (this is default)
FE: Create form to get booking user's email
Create a form to get a user's email address after they've confirmed a time on the Calendar UI page
Setup: Stripe API
https://stripe.com/docs/api/customers/create
https://stripe.com/docs/payments/checkout/subscriptions
Set up a dev account and use the appropriate API keys set up for the app.
IN: Onboarding part 2
- integrate user availability and timezone
BE: Appointment Model
Create Appointment Model
Appointment
- event_type_id
- name
- time (datetime)
- timezone
BE: Event Type Controllers
- POST /event-types -> Create an event type
- GET /event-types -> list of event types for logged in user
- PUT /event-types/:id -> Edit
- DELETE /event-types/:id -> Delete
IN: New Event
BE: Bugfix authentication
BE: Event Types Model
Create Model for Event Types
Event Type
- user_id
- title
- url
- duration (15, 30, 45, 60) -> these are in minutes
BE: Set up sendgrid
- Sign up with email (or test email)
- test it out (create a service that sends an email and test that it works)
- share credentials on Slack
FS: Display Appointments
Fetch all future/past appointments (for next/last 30 days).
Display them on the frontend. Maybe with headings for future/past
Show delete icon for future appointments
FE: Signup / Login Pages
- create two front-end react routers (login and signup)
- There is no landing page - redirect to signup
IN: Onboarding
Integrate the onboarding pages:
- connect URL textfield with user controller to check if URL is unique
- add field to user model for timezone
- add appropriate fields to the user model for availability
BE: Blacklist JWT
Blacklist JWT on logout
FE: Scheduler Calendar UI
Frontend
- Block off unavailable days
- Preselect the next day
- Block off time that is unavailable for the user (appointment time slots blocked off state)
- When time is selected, confirm time and schedule (create appointment BE)
FE/IN: Auth cleanup and enhancements
- When user is logged in
/signup
and/login
should redirect to the dashboard - Make the onboarding show up only once (check if user has their URL filled out, if they have their availability set)
- Add logout button into a menu when clicking user in Navbar
- Make logout button functional (it needs to hit a
logout
route in the backend)
FE: Upgrade page
Upgrade your account
Ignore some information from the mocks. Instead have two blocks:
- FREE STANDARD (this is by default) no need for payment
- PREMIUM ACCOUNT (payment) -> leads to Stripe checkout page
BUG: Error occurs when creating a second event type
There is no issue creating the first event. However, error occurs when trying to create second event.
From the output of terminal it seems the user_id is missing when creating the second event.
sqlalchemy.exc.DataError: (psycopg2.errors.InvalidTextRepresentation) invalid input syntax for type integer: ""
LINE 1: ...es (user_id, title, url, duration, color) VALUES ('', 'asd',...
^
[SQL: INSERT INTO event_types (user_id, title, url, duration, color) VALUES (%(user_id)s, %(title)s, %(url)s, %(duration)s, %(color)s) RETURNING event_types.id]
[parameters: {'user_id': '', 'title': 'asd', 'url': 'asd', 'duration': 30, 'color': '#3E200B'}]
(Background on this error at: http://sqlalche.me/e/14/9h9h)
BUG: need to handle unique event type url when creating event types
Double check whether url is unique when creating event types
Make User Name in Navbar Dynamic
replace the fixed name with dynamic name fetching from DB, and also the dashboard
FE: Create Skeleton for Dashboard
Separate components such as:
- Nav bar
- Main Content
BE: Refresh JWT expiry on each request
BE: Signup / Login OAuth2
*https://developers.google.com/calendar/quickstart/js
- https://cloud.google.com/nodejs/getting-started/authenticate-users
- https://dev.to/risafj/beginner-s-guide-to-oauth-understanding-access-tokens-and-authorization-codes-2988
- Create User when authentication is success
- Save access token, maintain logged in state on refresh
-
look for Flask JWT libraries
-
create a JWT, store it in a (httpOnly) cookie
-
decorator on the backend that checks whether JWT is valid
-
private route make an API call to check if JWT is valid and get the user back
Integration with cancel appointments
BUG: login/signup redirect issues
We already know about this and is looking into finding a solution.
Adding this issue for tracking purpose.
BUG: creating event type missing field issue
- When creating an event type, if we don't change the color and submit, it would give a missing field error alert.
- Rerender cards after adding new eventType
- edit create eventType dialog url InputAdornment
FE: Refactor onboarding
refactor onboarding to change the structure to:
<onboarding>
...<children>
</onboarding>
BE: create middleware for backend auth
createa. middleware that we can add to routes to ensure it is accessed by authenticated users
IN: Calendar UI integration
Make sure calendar shows correct times for availability
BE: Store Google Auth Token
- Store a user's Google Auth token in the User model to enable API calls to Google
- Store user's refresh token, to get a new auth token if necessary
BE/IN: Cancel appointment
Make a backend route to cancel an appointment
- delete calendar event
- send confirmation email
Once display appointments is done, integrate with frontend
BE: User Controllers
-
GET /user/:id/is_unique?url=<> -> checks if url is unique amongst other users
-
UPDATE /user/:id -> updates user information
-
we are not going to allow editing email (obviously because we're using OAuth with calendar). But we are going to let them edit other parts of their profile (such as availability)
IN: Creating Appointments
FE: New Event-Type Dialog
New dialog that allows you to create a new-type for a specific duration
- Check Event Types model to see what fields we need. Add "tag_colour" to model.
FE: Fix eventTypes render issue
Also fix the annoying <p>
errors in console 😂
FE/IN: Stripe checkout
Checkout page that takes card information and upgrades user to selected plan.
Or doesn't take payment information and downgrades user to selected plan
Delete Appointment Confirm Popup
FE/IN: Create PrivateRoute
Create a wrapper around <Route/>
that checks if the user is logged in and also hits a route in the backend to make sure the token is valid.
If the user is logged in and the token is valid, we go to the <Route/>
that is passed in.
If the user is not logged in or the token is not valid, redirect back to /login
IN: Dashboard
Integrate user's event-types controller
FE: Onboarding Pages
There are 3 pages to onboarding
/profile_settings -> unique url and timezone
- check for uniqueness to continue
- storing timezone in UTC
/confirm -> confirmation of successful connect
/availability -> setting availability hours and days
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.