History Research was a high school project, created in 2017, at a time when the political landscape of Brazil was tense with supporters of the return of the military period.
Initially the project was developed in PHP and JavaScript with MySQL database. In 2022 it was redone using more current technologies for development.
This project was developed with the following technologies:
- React
- Next.js
- TypeScript
- Tailwindcss
- GraphQL
- Apollo Client
- Clone the repository
git clone https://github.com/igorssc/history-research.git
cd history-research
- Install dependencies
yarn
# or
npm init
- Start the GraphQL Server
yarn server
# or
npm run server
In development environment, json-graphql-server is used to simulate the content storage service.
- Start the NextJs server
yarn dev
# or
npm run dev
You can now access localhost:3000
from your browser.
To configure the content storage service, you must follow a few steps:
-
Go to the website https://hygraph.com and create a new project;
-
Create a schema model, named "Vote", as in the image below:
- In the project settings, copy your Master Environment Url:
It will be used in the environment variables
- Create an Permanent Access Token:
- Change the permissions of your permanent access token, and leave it as below:
In this project, environment variables are used only in production
, to connect with the content storage service hygraph.
Locally, json-graphql-server is used to simulate the content storage service.
For the correct operation of the system, the following environment variables must be used:
NEXT_PUBLIC_API_URL=your-hygraph-master-environment-url
NEXT_PUBLIC_API_ACCESS_TOKEN=your-hygraph-permanent-token
Access https://history-research.vercel.app
This project is under MIT licence. See the archive LICENSE to more details.
Made with 💜 by IGS Design - Igor Santos 👋