Skip to content

RyanFortune02/NovaTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NovaTask

Overview

NovaTask is a full-stack application using a Django backend and a React frontend (powered by Vite). This guide covers the required installations and steps needed to run the project after cloning the repository locally.

Prerequisites

Setup Steps

  1. Clone the Repository

    git clone <https://github.com/RyanFortune02/NovaTask>
    cd NovaTask
  2. Configure the Client (React with Vite)

    • Navigate to the client app directory:
      cd client/app
    • Install dependencies:
      yarn install
      npm install react-bootstrap bootstrap @popperjs/core
    • Install FullCalendar packages (if not already included in package.json):
      cd client/app
      yarn add @fullcalendar/react @fullcalendar/daygrid @fullcalendar/timegrid @fullcalendar/interaction @fullcalendar/list @fullcalendar/rrule rrule
    • Start the client dev server:
      yarn dev
    • The client will be available at http://localhost:5173/.
  3. Configure the Server (Django)

    • Navigate to the Django project directory (server/newproject):
      cd server/newproject
    • Install backend dependencies:
      pip install -r requirements.txt
    • Apply migrations:
      python manage.py migrate
    • Start the Django development server:
      python manage.py runserver
    • The backend will be available at http://localhost:8000/.

Local Development vs Deployment

When running the application locally, you need to ensure the frontend is making API calls to your local Django server:

  1. For Local Development

    • All API calls in your React components should use the URL http://localhost:8000/api/ instead of the deployed URL.

    • Look for API calls in frontend (client/app/src) and make sure they're pointing to localhost:8000.

    • Example change:

      // Change this:
      fetch("https://ryanfortune.pythonanywhere.com/api/todos/");
      
      // To this for local development:
      fetch("http://localhost:8000/api/todos/");
    • Using local variables to easily switch between local and hosted api url's would have been the best approach

  2. CORS Configuration

    • The Django backend is already configured with CORS_ALLOW_ALL_ORIGINS = True in settings.py, which allows requests from any origin including localhost.
    • This is suitable for development but should be restricted in production.

Resources used:

Resources for hosting: https://www.youtube.com/watch?v=XMGOfJxnH7s (Vite react to netlify) pythonanywhere backend hosting - Wes (TA)

Link for frontend(may not be hosted at time of checking link): https://banyanplanner.netlify.app/

  • followed the netlify docs to host

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors