Skip to content

Commit

Permalink
fix: lint & format
Browse files Browse the repository at this point in the history
  • Loading branch information
Drish-xD committed Jun 10, 2024
1 parent b84b063 commit 8c10739
Show file tree
Hide file tree
Showing 26 changed files with 4,952 additions and 2,436 deletions.
96 changes: 48 additions & 48 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
version: "3.8"
services:
local:
build:
context: .
dockerfile: docker/Dockerfile.local
container_name: quiz-creator_local
ports:
- 3000:3000
volumes:
- /app/node_modules
env_file:
- .env.local
depends_on:
- json-server

json-server:
image: clue/json-server
container_name: json-server
ports:
- "3001:80"
volumes:
- "./sessions_db.json:/data/db.json"
restart: always

staging:
build:
context: .
dockerfile: docker\Dockerfile.staging
container_name: quiz-creator_staging
ports:
- 3010:3000
volumes:
- /app/node_modules
env_file:
- .env.staging

prod:
container_name: quiz-creator_prod
build:
context: .
dockerfile: docker\Dockerfile.prod
ports:
- 3020:3000
volumes:
- /app/node_modules
env_file:
- .env.prod
version: '3.8'
services:
local:
build:
context: .
dockerfile: docker/Dockerfile.local
container_name: quiz-creator_local
ports:
- 3000:3000
volumes:
- /app/node_modules
env_file:
- .env.local
depends_on:
- json-server

json-server:
image: clue/json-server
container_name: json-server
ports:
- '3001:80'
volumes:
- './sessions_db.json:/data/db.json'
restart: always

staging:
build:
context: .
dockerfile: docker\Dockerfile.staging
container_name: quiz-creator_staging
ports:
- 3010:3000
volumes:
- /app/node_modules
env_file:
- .env.staging

prod:
container_name: quiz-creator_prod
build:
context: .
dockerfile: docker\Dockerfile.prod
ports:
- 3020:3000
volumes:
- /app/node_modules
env_file:
- .env.prod
26 changes: 13 additions & 13 deletions docs/CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Contributing:

We welcome contributions to the Session Creator project! Here's how you can help:

1. **Report issues:** Found a bug? Let us know by creating a detailed issue on the GitHub repository. Include steps to reproduce the issue.

2. **Suggest features:** Have an idea for a new feature? Open an issue to discuss your proposal and how it would improve the project.

3. **Contribute code:** Before starting on a larger feature, please open an issue to discuss it with the team. Then, follow these guidelines:
- Fork the repository
- Create a new branch with a descriptive name (e.g., feature-name)
- Make your changes, following established coding style and TypeScript best practices
- Open a pull request with a clear description of your contribution
# Contributing:

We welcome contributions to the Session Creator project! Here's how you can help:

1. **Report issues:** Found a bug? Let us know by creating a detailed issue on the GitHub repository. Include steps to reproduce the issue.

2. **Suggest features:** Have an idea for a new feature? Open an issue to discuss your proposal and how it would improve the project.

3. **Contribute code:** Before starting on a larger feature, please open an issue to discuss it with the team. Then, follow these guidelines:
- Fork the repository
- Create a new branch with a descriptive name (e.g., feature-name)
- Make your changes, following established coding style and TypeScript best practices
- Open a pull request with a clear description of your contribution
88 changes: 44 additions & 44 deletions docs/GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
## Tech Stack

- [**Next.js**](https://nextjs.org/): A powerful React framework that delivers excellent performance, server-side rendering (good for SEO), and a structured approach to building web applications. Provides the foundation for the web app's structure and routing.
- [**TypeScript**](https://www.typescriptlang.org/): Adds static typing to JavaScript, improving code maintainability, reducing errors, and making the codebase more robust. Ensures clear type definitions and catches potential problems during development.
- [**React Hook Form**](https://react-hook-form.com/): Simplifies form creation, management, and validation within React applications, reducing boilerplate code and making form development more efficient.
- [**Tailwind CSS**](https://tailwindcss.com/): A utility-first CSS framework that provides granular control over styling. Enables rapid development and a consistent design system across your app.
- [**AWS SDK**](https://aws.amazon.com/developer/tools/): Provides tools to interact with AWS services like AWS Lambda and AWS SNS from within your application.

## Features

1. **Centralized Resource Management:** Organize and access quizzes, live classes, and other resources from one place.
2. **Session Management:** Create, update, delete, and duplicate sessions effortlessly.
3. **Serverless:** Integrate serverless lambda functions for scalability and dynamic backend logic.
4. **Server-Side Rendering (SSR):** Improve initial page load times and enhance search engine optimization (SEO).

## Page Routes

| Name | Route format |
| ------------------- | ---------------------------------------- |
| Home (Pagenation) | `/?pageNo={no}` |
| Session (Create) | `/Session?type=create` |
| Session (Edit) | `/Session?type=edit&sessionId={id}` |
| Session (Duplicate) | `/Session?type=duplicate&sessionId={id}` |

## Diagrams

### Architecture

![Architecture Diagram](../docs/images/Architecture.png)

### Sequence Diagram

![Sequence Diagram](../docs/images/Sequence.png)

## Additional help

Various docs and repositories which are helpful for the project understanding

- [Backend](https://github.com/avantifellows/db-service)
- [Next.js Docs](https://nextjs.org/docs/)
- [Typescript Cheatsheets](https://www.typescriptlang.org/cheatsheets/)
- [AWS SNS Docs](https://docs.aws.amazon.com/sns/latest/dg/welcome.html)
- [React-Hook-Forms Docs](https://react-hook-form.com/get-started)
- [Pre-commit](https://pre-commit.com)
## Tech Stack

- [**Next.js**](https://nextjs.org/): A powerful React framework that delivers excellent performance, server-side rendering (good for SEO), and a structured approach to building web applications. Provides the foundation for the web app's structure and routing.
- [**TypeScript**](https://www.typescriptlang.org/): Adds static typing to JavaScript, improving code maintainability, reducing errors, and making the codebase more robust. Ensures clear type definitions and catches potential problems during development.
- [**React Hook Form**](https://react-hook-form.com/): Simplifies form creation, management, and validation within React applications, reducing boilerplate code and making form development more efficient.
- [**Tailwind CSS**](https://tailwindcss.com/): A utility-first CSS framework that provides granular control over styling. Enables rapid development and a consistent design system across your app.
- [**AWS SDK**](https://aws.amazon.com/developer/tools/): Provides tools to interact with AWS services like AWS Lambda and AWS SNS from within your application.

## Features

1. **Centralized Resource Management:** Organize and access quizzes, live classes, and other resources from one place.
2. **Session Management:** Create, update, delete, and duplicate sessions effortlessly.
3. **Serverless:** Integrate serverless lambda functions for scalability and dynamic backend logic.
4. **Server-Side Rendering (SSR):** Improve initial page load times and enhance search engine optimization (SEO).

## Page Routes

| Name | Route format |
| ------------------- | ---------------------------------------- |
| Home (Pagenation) | `/?pageNo={no}` |
| Session (Create) | `/Session?type=create` |
| Session (Edit) | `/Session?type=edit&sessionId={id}` |
| Session (Duplicate) | `/Session?type=duplicate&sessionId={id}` |

## Diagrams

### Architecture

![Architecture Diagram](../docs/images/Architecture.png)

### Sequence Diagram

![Sequence Diagram](../docs/images/Sequence.png)

## Additional help

Various docs and repositories which are helpful for the project understanding

- [Backend](https://github.com/avantifellows/db-service)
- [Next.js Docs](https://nextjs.org/docs/)
- [Typescript Cheatsheets](https://www.typescriptlang.org/cheatsheets/)
- [AWS SNS Docs](https://docs.aws.amazon.com/sns/latest/dg/welcome.html)
- [React-Hook-Forms Docs](https://react-hook-form.com/get-started)
- [Pre-commit](https://pre-commit.com)
90 changes: 45 additions & 45 deletions docs/INSTALATION.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# How to Setup

## Prerequisites

- Node.js and npm (or yarn/pnpm) [Download](https://nodejs.org/en/download)

- Docker and Docker Compose [Download](https://docs.docker.com/get-docker/)

## Setup Instructions

1. **Clone the repository:**

```bash
git clone https://github.com/avantifellows/quiz-creator.git
```

2. **Install dependencies:**

```bash
cd session-creator
npm ci
```

3. **Set up environment variables:**

Create a .env.local file and add any required variables

```bash
cp .env.example .env.local
```

4. **Start the development environment:**

```bash
docker compose up local
```

5. **Access the application:**

The application should be accessible at [`http://localhost:3000`](http://localhost:3000).

> **Note:**
>
> - For local development, the application utilizes json-server to simulate a backend. You'll need to have actual environment variables set up to interact with the real backend services.
> - Currently, CRUD functionality may not work as expected in the local environment due to the json-server limitations. These features will function correctly when connected to the real backend.
# How to Setup

## Prerequisites

- Node.js and npm (or yarn/pnpm) [Download](https://nodejs.org/en/download)

- Docker and Docker Compose [Download](https://docs.docker.com/get-docker/)

## Setup Instructions

1. **Clone the repository:**

```bash
git clone https://github.com/avantifellows/quiz-creator.git
```

2. **Install dependencies:**

```bash
cd session-creator
npm ci
```

3. **Set up environment variables:**

Create a .env.local file and add any required variables

```bash
cp .env.example .env.local
```

4. **Start the development environment:**

```bash
docker compose up local
```

5. **Access the application:**

The application should be accessible at [`http://localhost:3000`](http://localhost:3000).

> **Note:**
>
> - For local development, the application utilizes json-server to simulate a backend. You'll need to have actual environment variables set up to interact with the real backend services.
> - Currently, CRUD functionality may not work as expected in the local environment due to the json-server limitations. These features will function correctly when connected to the real backend.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
output: 'standalone',
reactStrictMode: true,
};

Expand Down
Loading

0 comments on commit 8c10739

Please sign in to comment.