From e09bfbc536fa85df1f36d42eaf41f38f86c07708 Mon Sep 17 00:00:00 2001 From: nimanns Date: Sat, 16 Nov 2024 15:54:43 -0500 Subject: [PATCH] update readme. --- README.md | 66 +++++++++++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index dca281bc..fcb5fa71 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,44 @@ -# 370J Media Commons Room Reservation App +# Booking App -## About +This project is a booking management application built with Next.js. -This application is designed for reserving rooms at the 370J Media Commons Room. +## Getting Started -## Technologies Used +Follow these steps to run the application in your local environment. -- **Google App Script**: For backend scripting and integration. -- **React & Google App Script**: Utilizing [React-Google-Apps-Script](https://github.com/enuchi/React-Google-Apps-Script) for a responsive front-end experience. -- **clasp**: For Google Apps Script project management and deployment. +### Prerequisites -## Deployment +- Node.js (version 18 or later) +- npm (usually comes with Node.js) -We employ GitHub workflows for our deployment process. Pushing or merging to different branches will automatically trigger different Google App Script deploys: -- `main` branch: triggers the DEVELOPMENT deploy, which serves from localhost and reads/writes the development calendars -- `staging` branch: triggers the STAGING deploy, which serves from the GAS project and reads/writes the development calendars -- `prod` branch: triggers the PRODUCTION deploy, which serves from the GAS project and reads/writes the **production** calendars +### Installation -The `NODE_ENV` environment variable controls where we serve from, and the `CALENDAR_ENV` environment variable controls which calendars we use. These values are specified in the `package.json` commands triggered by the workflows +1. Clone the repository or download the project files. -## Preparation +2. Navigate to the project directory: + ``` + cd booking-app + ``` +3. Install the dependencies: + `npm install` +4. Obtain the `.env` file from a project administrator and place it in the root directory of the project. -Before setting up the project, ensure you have the following: +### Running the Application -- `.clasprc.json` file from another developer. -- `deploymentId` for Google Apps Script. +To start the development server: +`npm run dev` +The application should now be running on [http://localhost:3000](http://localhost:3000). -## Setup Instructions +## Environment Variables -When developing locally, please follow the flow below. +This project uses environment variables for configuration. Make sure you have received the `.env` file from a project administrator and placed it in the root directory before running the application. -1. **Clone the Repository**: -2. **Configure `.clasprc.json`**: - Set up the `.clasprc.json` file with the necessary credentials. -3. **Install Packages**: - ```bash - npm install - ``` -4. **Upload Local Code to Google App Script**: +## Deployment - ```bash - npm run start - ``` +This project uses automated deployment pipelines: - Please continue running this and execute the following command. +- Pushing to the `main` branch automatically deploys to the development environment. +- Pushing to the `staging` branch automatically deploys to the staging environment. +- Pushing to the `production` branch automatically deploys to the production environment. -5. **Create a New Version of Google App Script**: - Deploy using clasp, targeting your `deploymentId`: - ```bash - clasp deploy --deploymentId ${deploymentID} -d DEV_YOURNAME - ``` -6. **Access the Application**: - You can now access the app at `https://script.google.com/a/macros/nyu.edu/s/${deploymentId}/exec`. +Please ensure you push your changes to the appropriate branch based on the intended deployment environment.