Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sheeter Project

A web application that integrates with Google Sheets API to store and manage tasks.

Features

  • OAuth 2.0 authentication with Google
  • Write data to Google Sheets
  • Environment variable configuration for secure deployment

Prerequisites

  • Node.js (v14 or higher)
  • npm
  • Google Cloud Platform account with Google Sheets API enabled
  • Google OAuth 2.0 credentials

Local Development Setup

  1. Clone the repository

    git clone <your-repository-url>
    cd sheeter_project
    
  2. Install dependencies

    cd server
    npm install
    
  3. Set up environment variables

    • Create a .env file in the server directory with the following variables:
    PORT=3000
    GOOGLE_SHEET_ID=your_google_sheet_id
    
  4. Start the development server

    npm run dev
    

Deployment Guide

Preparing for Deployment

  1. Create a GitHub repository
    • Go to GitHub and create a new repository
    • Initialize your local project with Git and push to GitHub:
    git init
    git add .
    git commit -m "Initial commit"
    git branch -M main
    git remote add origin <your-github-repo-url>
    git push -u origin main
    

Deploying to Render

Render is a cloud platform that offers free hosting for web services.

  1. Sign up for a Render account

  2. Create a new Web Service

    • Connect your GitHub repository
    • Configure the service:
      • Name: sheeter-project
      • Environment: Node
      • Build Command: cd server && npm install
      • Start Command: cd server && npm start
  3. Add environment variables

  4. Deploy the service

Deploying to Heroku

  1. Install the Heroku CLI and login

    npm install -g heroku
    heroku login
    
  2. Create a new Heroku app

    heroku create sheeter-app
    
  3. Add a Procfile to the root directory

    • Create a file named Procfile with the content:
    web: cd server && npm start
    
  4. Configure environment variables

    heroku config:set NODE_ENV=production
    heroku config:set GOOGLE_SHEET_ID=your_google_sheet_id
    heroku config:set REDIRECT_URI=https://your-heroku-app-name.herokuapp.com/oauth2callback
    
  5. Deploy to Heroku

    git push heroku main
    

Important Security Notes

  1. Never commit sensitive files to GitHub

    • OAuth credentials (client_secret*.json)
    • .env files with API keys or secrets
  2. Update Google OAuth settings

Troubleshooting

  • If authentication fails, check that your redirect URI is correctly configured both in your app and in Google Cloud Console
  • For deployment issues, check the logs of your hosting provider

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages