Skip to content

Commit 8c10739

Browse files
committed
fix: lint & format
1 parent b84b063 commit 8c10739

26 files changed

+4952
-2436
lines changed

docker-compose.yml

+48-48
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
version: "3.8"
2-
services:
3-
local:
4-
build:
5-
context: .
6-
dockerfile: docker/Dockerfile.local
7-
container_name: quiz-creator_local
8-
ports:
9-
- 3000:3000
10-
volumes:
11-
- /app/node_modules
12-
env_file:
13-
- .env.local
14-
depends_on:
15-
- json-server
16-
17-
json-server:
18-
image: clue/json-server
19-
container_name: json-server
20-
ports:
21-
- "3001:80"
22-
volumes:
23-
- "./sessions_db.json:/data/db.json"
24-
restart: always
25-
26-
staging:
27-
build:
28-
context: .
29-
dockerfile: docker\Dockerfile.staging
30-
container_name: quiz-creator_staging
31-
ports:
32-
- 3010:3000
33-
volumes:
34-
- /app/node_modules
35-
env_file:
36-
- .env.staging
37-
38-
prod:
39-
container_name: quiz-creator_prod
40-
build:
41-
context: .
42-
dockerfile: docker\Dockerfile.prod
43-
ports:
44-
- 3020:3000
45-
volumes:
46-
- /app/node_modules
47-
env_file:
48-
- .env.prod
1+
version: '3.8'
2+
services:
3+
local:
4+
build:
5+
context: .
6+
dockerfile: docker/Dockerfile.local
7+
container_name: quiz-creator_local
8+
ports:
9+
- 3000:3000
10+
volumes:
11+
- /app/node_modules
12+
env_file:
13+
- .env.local
14+
depends_on:
15+
- json-server
16+
17+
json-server:
18+
image: clue/json-server
19+
container_name: json-server
20+
ports:
21+
- '3001:80'
22+
volumes:
23+
- './sessions_db.json:/data/db.json'
24+
restart: always
25+
26+
staging:
27+
build:
28+
context: .
29+
dockerfile: docker\Dockerfile.staging
30+
container_name: quiz-creator_staging
31+
ports:
32+
- 3010:3000
33+
volumes:
34+
- /app/node_modules
35+
env_file:
36+
- .env.staging
37+
38+
prod:
39+
container_name: quiz-creator_prod
40+
build:
41+
context: .
42+
dockerfile: docker\Dockerfile.prod
43+
ports:
44+
- 3020:3000
45+
volumes:
46+
- /app/node_modules
47+
env_file:
48+
- .env.prod

docs/CONTRIBUTION.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Contributing:
2-
3-
We welcome contributions to the Session Creator project! Here's how you can help:
4-
5-
1. **Report issues:** Found a bug? Let us know by creating a detailed issue on the GitHub repository. Include steps to reproduce the issue.
6-
7-
2. **Suggest features:** Have an idea for a new feature? Open an issue to discuss your proposal and how it would improve the project.
8-
9-
3. **Contribute code:** Before starting on a larger feature, please open an issue to discuss it with the team. Then, follow these guidelines:
10-
- Fork the repository
11-
- Create a new branch with a descriptive name (e.g., feature-name)
12-
- Make your changes, following established coding style and TypeScript best practices
13-
- Open a pull request with a clear description of your contribution
1+
# Contributing:
2+
3+
We welcome contributions to the Session Creator project! Here's how you can help:
4+
5+
1. **Report issues:** Found a bug? Let us know by creating a detailed issue on the GitHub repository. Include steps to reproduce the issue.
6+
7+
2. **Suggest features:** Have an idea for a new feature? Open an issue to discuss your proposal and how it would improve the project.
8+
9+
3. **Contribute code:** Before starting on a larger feature, please open an issue to discuss it with the team. Then, follow these guidelines:
10+
- Fork the repository
11+
- Create a new branch with a descriptive name (e.g., feature-name)
12+
- Make your changes, following established coding style and TypeScript best practices
13+
- Open a pull request with a clear description of your contribution

docs/GUIDE.md

+44-44
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
## Tech Stack
2-
3-
- [**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.
4-
- [**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.
5-
- [**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.
6-
- [**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.
7-
- [**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.
8-
9-
## Features
10-
11-
1. **Centralized Resource Management:** Organize and access quizzes, live classes, and other resources from one place.
12-
2. **Session Management:** Create, update, delete, and duplicate sessions effortlessly.
13-
3. **Serverless:** Integrate serverless lambda functions for scalability and dynamic backend logic.
14-
4. **Server-Side Rendering (SSR):** Improve initial page load times and enhance search engine optimization (SEO).
15-
16-
## Page Routes
17-
18-
| Name | Route format |
19-
| ------------------- | ---------------------------------------- |
20-
| Home (Pagenation) | `/?pageNo={no}` |
21-
| Session (Create) | `/Session?type=create` |
22-
| Session (Edit) | `/Session?type=edit&sessionId={id}` |
23-
| Session (Duplicate) | `/Session?type=duplicate&sessionId={id}` |
24-
25-
## Diagrams
26-
27-
### Architecture
28-
29-
![Architecture Diagram](../docs/images/Architecture.png)
30-
31-
### Sequence Diagram
32-
33-
![Sequence Diagram](../docs/images/Sequence.png)
34-
35-
## Additional help
36-
37-
Various docs and repositories which are helpful for the project understanding
38-
39-
- [Backend](https://github.com/avantifellows/db-service)
40-
- [Next.js Docs](https://nextjs.org/docs/)
41-
- [Typescript Cheatsheets](https://www.typescriptlang.org/cheatsheets/)
42-
- [AWS SNS Docs](https://docs.aws.amazon.com/sns/latest/dg/welcome.html)
43-
- [React-Hook-Forms Docs](https://react-hook-form.com/get-started)
44-
- [Pre-commit](https://pre-commit.com)
1+
## Tech Stack
2+
3+
- [**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.
4+
- [**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.
5+
- [**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.
6+
- [**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.
7+
- [**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.
8+
9+
## Features
10+
11+
1. **Centralized Resource Management:** Organize and access quizzes, live classes, and other resources from one place.
12+
2. **Session Management:** Create, update, delete, and duplicate sessions effortlessly.
13+
3. **Serverless:** Integrate serverless lambda functions for scalability and dynamic backend logic.
14+
4. **Server-Side Rendering (SSR):** Improve initial page load times and enhance search engine optimization (SEO).
15+
16+
## Page Routes
17+
18+
| Name | Route format |
19+
| ------------------- | ---------------------------------------- |
20+
| Home (Pagenation) | `/?pageNo={no}` |
21+
| Session (Create) | `/Session?type=create` |
22+
| Session (Edit) | `/Session?type=edit&sessionId={id}` |
23+
| Session (Duplicate) | `/Session?type=duplicate&sessionId={id}` |
24+
25+
## Diagrams
26+
27+
### Architecture
28+
29+
![Architecture Diagram](../docs/images/Architecture.png)
30+
31+
### Sequence Diagram
32+
33+
![Sequence Diagram](../docs/images/Sequence.png)
34+
35+
## Additional help
36+
37+
Various docs and repositories which are helpful for the project understanding
38+
39+
- [Backend](https://github.com/avantifellows/db-service)
40+
- [Next.js Docs](https://nextjs.org/docs/)
41+
- [Typescript Cheatsheets](https://www.typescriptlang.org/cheatsheets/)
42+
- [AWS SNS Docs](https://docs.aws.amazon.com/sns/latest/dg/welcome.html)
43+
- [React-Hook-Forms Docs](https://react-hook-form.com/get-started)
44+
- [Pre-commit](https://pre-commit.com)

docs/INSTALATION.md

+45-45
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
# How to Setup
2-
3-
## Prerequisites
4-
5-
- Node.js and npm (or yarn/pnpm) [Download](https://nodejs.org/en/download)
6-
7-
- Docker and Docker Compose [Download](https://docs.docker.com/get-docker/)
8-
9-
## Setup Instructions
10-
11-
1. **Clone the repository:**
12-
13-
```bash
14-
git clone https://github.com/avantifellows/quiz-creator.git
15-
```
16-
17-
2. **Install dependencies:**
18-
19-
```bash
20-
cd session-creator
21-
npm ci
22-
```
23-
24-
3. **Set up environment variables:**
25-
26-
Create a .env.local file and add any required variables
27-
28-
```bash
29-
cp .env.example .env.local
30-
```
31-
32-
4. **Start the development environment:**
33-
34-
```bash
35-
docker compose up local
36-
```
37-
38-
5. **Access the application:**
39-
40-
The application should be accessible at [`http://localhost:3000`](http://localhost:3000).
41-
42-
> **Note:**
43-
>
44-
> - 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.
45-
> - 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.
1+
# How to Setup
2+
3+
## Prerequisites
4+
5+
- Node.js and npm (or yarn/pnpm) [Download](https://nodejs.org/en/download)
6+
7+
- Docker and Docker Compose [Download](https://docs.docker.com/get-docker/)
8+
9+
## Setup Instructions
10+
11+
1. **Clone the repository:**
12+
13+
```bash
14+
git clone https://github.com/avantifellows/quiz-creator.git
15+
```
16+
17+
2. **Install dependencies:**
18+
19+
```bash
20+
cd session-creator
21+
npm ci
22+
```
23+
24+
3. **Set up environment variables:**
25+
26+
Create a .env.local file and add any required variables
27+
28+
```bash
29+
cp .env.example .env.local
30+
```
31+
32+
4. **Start the development environment:**
33+
34+
```bash
35+
docker compose up local
36+
```
37+
38+
5. **Access the application:**
39+
40+
The application should be accessible at [`http://localhost:3000`](http://localhost:3000).
41+
42+
> **Note:**
43+
>
44+
> - 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.
45+
> - 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.

next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
output: "standalone",
3+
output: 'standalone',
44
reactStrictMode: true,
55
};
66

0 commit comments

Comments
 (0)