forked from inkonchain/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This update enhances the README by improving its structure and readability to create a more user-friendly experience for new users and contributors. The changes include clearer instructions, organized sections, and updated information about the CI/CD pipeline and feature deployment, making it easier for users to set up and understand the project. This will help attract and retain new users by providing a polished and accessible documentation experience.
- Loading branch information
Showing
1 changed file
with
44 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,64 @@ | ||
# InkChain Docs App | ||
# InkChain Documentation App | ||
|
||
## Build | ||
An advanced, streamlined documentation platform built with Next.js and Nextra for InkChain. | ||
|
||
```bash | ||
docker build -t docs . | ||
docker run -p 3000:3000 docs | ||
``` | ||
## π Build & Run | ||
|
||
## Requirements | ||
1. **Build Docker image**: | ||
```bash | ||
docker build -t docs . | ||
``` | ||
|
||
- NodeJs (v20.11.0) | ||
2. **Run Docker container**: | ||
```bash | ||
docker run -p 3000:3000 docs | ||
``` | ||
|
||
## Overview | ||
## π Requirements | ||
|
||
This is a Next.js Documentation application built using [Nextra](https://nextra.site/), a tool that simplifies the process of creating documentation sites with Next.js. As we are utilizing Nextra, the application currently relies on the [Pages Router]() provided by Next.js for navigation and routing. Currently, we are not able to upgrade to use the App Router, due to it not being yet supported by Nextra. | ||
- **Node.js**: v20.11.0 or higher | ||
|
||
## Getting Started | ||
## π Overview | ||
|
||
Clone this repository, install the dependencies, and start the development server with the following commands: | ||
This is a documentation application powered by [Nextra](https://nextra.site/) and built on [Next.js](https://nextjs.org/). Nextra simplifies the creation of documentation sites, allowing us to leverage the **Pages Router** for efficient navigation and routing. Currently, due to compatibility limitations, we have not yet upgraded to the App Router. | ||
|
||
```bash | ||
pnpm install | ||
pnpm run dev | ||
``` | ||
## π Getting Started | ||
|
||
## Tooling | ||
To get started with local development: | ||
|
||
We are using a bunch of tools to enhance our development experience and to prevent us from pushing code with errors. | ||
Here are some of the tools we are using: | ||
1. **Clone the repository** | ||
2. **Install dependencies**: | ||
```bash | ||
pnpm install | ||
``` | ||
3. **Start development server**: | ||
```bash | ||
pnpm run dev | ||
``` | ||
|
||
- **[cspell](https://cspell.org/)**: for real-time spell checking and maintaining documentation quality. | ||
- **[remark](https://remark.js.org/)**: for processing and rendering Markdown content with additional plugins. | ||
- **[ESLint](https://eslint.org/)**: for enforcing code quality standards and catching potential issues. | ||
- **[Prettier](https://prettier.io/)**: for enforcing code quality standards and catching potential issues. | ||
- **[Tailwind CSS](https://tailwindcss.com/)**: for utility-first CSS styling and rapid UI development. | ||
## π Tooling | ||
|
||
## CI/CD | ||
Our development setup includes multiple tools to maintain high-quality code and documentation: | ||
|
||
We leverage GitHub Actions to perform some automated checks on all of our PRs. In particular, we run the following checks: | ||
- **[CSpell](https://cspell.org/)**: Real-time spell checking to maintain documentation accuracy. | ||
- **[Remark](https://remark.js.org/)**: Processes and renders Markdown content with added plugins. | ||
- **[ESLint](https://eslint.org/)**: Ensures code quality by catching potential issues. | ||
- **[Prettier](https://prettier.io/)**: Enforces consistent code formatting. | ||
- **[Tailwind CSS](https://tailwindcss.com/)**: Utility-first CSS framework for fast, responsive UI development. | ||
|
||
- **js-lint**: Run Eslint to make sure JS code is formatted correctly. | ||
- **md-lint**: Run Remark to make sure Markdown code is formatted correctly. | ||
- **format**: Run Prettier to make sure code is formatted correctly. | ||
- **spell-check**: Run CSpell to make sure the content of our MDX files has the right spelling. Sometimes this command may fail for legit words (e.g. "inkchain") if that is the case, then we can simply add any word that we'd like to whitelist to the [`./cspell/project-words.txt`](./cspell/project-words.txt) file | ||
## π¦ CI/CD Pipeline | ||
|
||
### Feature Branch Deployment | ||
Our CI/CD setup utilizes GitHub Actions to run automated checks on every pull request (PR): | ||
|
||
Each pull request (PR) submitted to this repository triggers an automated deployment process through AWS Amplify. When a PR is opened or updated, AWS Amplify Console automatically deploys the changes to a unique, temporary hosting environment. This allows for real-time testing and review of the feature branch's changes in a live setting. The deployment URL is provided within the PR checks, enabling team members and stakeholders to interact with the new features before they are merged into the main branch. | ||
- **js-lint**: Ensures proper JavaScript code formatting with ESLint. | ||
- **md-lint**: Checks Markdown code formatting with Remark. | ||
- **format**: Enforces consistent code style with Prettier. | ||
- **spell-check**: Uses CSpell to verify correct spelling in documentation. For any unique terms (e.g., "InkChain"), add them to the [`./cspell/project-words.txt`](./cspell/project-words.txt) file to whitelist. | ||
|
||
This continuous deployment pipeline ensures that code is tested in a production-like environment early in the development cycle, helping to catch issues early and streamline the overall development process. | ||
## π Feature Branch Deployment | ||
|
||
### Production Deployment | ||
For every new PR, our CI/CD pipeline deploys a temporary environment via **AWS Amplify**. This real-time deployment enables live testing and review of changes before merging, ensuring a smoother workflow. The deployment URL is automatically provided within the PR checks, allowing team members to interact with new features. | ||
|
||
The application is set up for continuous deployment using AWS Amplify. Upon every merge into the `main` branch, AWS Amplify automatically triggers a new build and deploys the updated version of the application. This ensures that the latest documentation is always available to end-users without any manual intervention in the deployment process. | ||
## π Production Deployment | ||
|
||
The `main` branch is configured for automatic continuous deployment via **AWS Amplify**. Every merge triggers a new build and deployment, ensuring that the latest version of the documentation is available to users without manual intervention. |