This is a clone of Trello application built using Hasura and Next.js. This application has been bootstrapped using Hasura Next.js Boilerplate This mono-repo consists of the following packages:
- 1. Clone the application
- 2. Install Lerna globally
- 3. Bootstrap the packages
- 4. Start the packages
- 5. Go inside the directory of the backend package
- 6. Create a .env file and copy the contents from .env.example (present in packages/backend directory)
- 7. Generate the RSA keys
- 8. Print the keys in the escaped format
- 9. Copy the value of the key into the
HASURA_GRAPHQL_JWT_SECRETkey (in the .env file)
- 10. Start docker-compose
- Other interesting repositories
This boilerplate is built using Lerna for managing all the packages in a simple manner. Because of Lerna, it becomes very easy to install, develop and maintain a mono-repo structure.
Frontend: Next.js application1.
This application is the primary user-facing application. Once it’s up and running (see Development section), it’s available on http://localhost:3000/.
To create a new user, we’ll have to Sign Up using Google. NextAuth is being used to help us in authentication.
Backend: Dockerized Hasura application2.
Hasura is an open source engine that connects to our databases & micro-services and auto-generates a production-ready GraphQL backend. It’s very easy to get Hasura up and running on our local system. All the migrations are set up in the migrations directory.
1. Clone the application
git clone https://github.com/ghoshnirmalya/nextjs-hasura-trello-clone
2. Install Lerna globally
npm install --global lerna
3. Bootstrap the packages
From the project root, we can run the following command to bootstrap the packages and install all their dependencies and linking any cross-dependencies:
4. Start the packages
From the project root, we can run the following command to start our Node.js packages:
The above command will start the frontend package on http://localhost:3000/.
The backend package doesn’t do anything after we execute the above command.
5. Go inside the directory of the backend package
6. Create a .env file and copy the contents from .env.example (present in packages/backend directory)
7. Generate the RSA keys
openssl genrsa -out private.pem 2048 openssl rsa -in private.pem -pubout > public.pem
8. Print the keys in the escaped format
awk -v ORS='\\n' '1' public.pem
9. Copy the value of the key into the
HASURA_GRAPHQL_JWT_SECRET key (in the .env file)
10. Start docker-compose
We need to start Docker and then run the above command which will change the current directory to the backend package’s directory and then start the backend package. If everything goes well, it’ll be up and running on http://localhost:8080/v1/graphql.
We’re still working on this feature. The documentation will be updated soon.
Other interesting repositories
This project is licensed under the MIT License.