Skip to content

Commit

Permalink
update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
nimanns committed Nov 16, 2024
1 parent 79feae7 commit e09bfbc
Showing 1 changed file with 28 additions and 38 deletions.
66 changes: 28 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit e09bfbc

Please sign in to comment.