EconomiX is an application designed to record and measure your earnings and expenses.
This project was developed with the following technologies:
- TypeScript
- React
- Next.js
- Next-pwa
- Next-auth
- GraphQl
- Apollo Client
- Tailwind
- Recharts
- Clone the repository
git clone https://github.com/igorssc/economix.git
cd economix
- Install dependencies
yarn
# or
npm init
-
Put your environment variables in a file .env.local at the root of the project
-
Start the server
yarn dev
# or
npm run dev
You can now access localhost:3000
from your browser. An application layout template:
This project utilizes the power of Recharts, a robust charting library for React, to create visually appealing and interactive charts. Recharts offers a wide range of chart types, including line charts, bar charts, pie charts, and more.
In this project, Recharts was employed to provide insightful visualizations for the recorded earnings and expenses. It offers a seamless integration with React components, making it convenient to render data-driven charts with minimal configuration.
To learn more about how to use Recharts and explore its extensive features, you can refer to the official documentation: Recharts Documentation
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 "Record", as in the image below:
![](https://private-user-images.githubusercontent.com/26682297/246463129-f9512253-f4c7-4c89-a7bd-36ddc49c6224.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NjYwMzEsIm5iZiI6MTcyMzg2NTczMSwicGF0aCI6Ii8yNjY4MjI5Ny8yNDY0NjMxMjktZjk1MTIyNTMtZjRjNy00Yzg5LWE3YmQtMzZkZGM0OWM2MjI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDAzMzUzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzZGUxMWI0NjlkZGFlNWI3ZmE2MTI3MjdlY2IwMWVmZDJhOTU3NWMzYjVjMDQwMmRkZWNhNzU0ZjI1MDA1ZGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KOlSo3iXr6kWkVFJyHtFgeFUnPMclaVeVUvY-ZLGsto)
- 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:
![](https://private-user-images.githubusercontent.com/26682297/246463320-cc073d9d-7fc8-4603-beda-9f24982878a0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NjYwMzEsIm5iZiI6MTcyMzg2NTczMSwicGF0aCI6Ii8yNjY4MjI5Ny8yNDY0NjMzMjAtY2MwNzNkOWQtN2ZjOC00NjAzLWJlZGEtOWYyNDk4Mjg3OGEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDAzMzUzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5MGNhNWYyZDU2OWIwMGMwYzI1MjcxNThlMGI2Y2JhNGQyZWQyNTM2NGJjM2RiYTRjNjNjYTI0MDI5ZmFiYzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9APs7NJW2G4GVZ3z6MW7fyOySYkADOyF8Im7qtZFQNc)
In this project, environment variables are used
, to connect with the content storage service hygraph.
For the correct operation of the system, the following environment variables must be used:
GOOGLE_CLIENT_ID=id-of-your-google-application
GOOGLE_CLIENT_SECRET=your-google-secret-token
FACEBOOK_CLIENT_ID=id-of-your-google-application
FACEBOOK_CLIENT_SECRET=your-facebook-secret-token
NEXT_PUBLIC_HYGRAPH_URI=your-hygraph-master-environment-url
NEXT_PUBLIC_HYGRAPH_CLIENT_SECRET=your-hygraph-secret-token
NEXTAUTH_SECRET=secret-token-for-your-application-in-production
Make sure to replace GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET, and other relevant fields with your own Google and Facebook configuration information, along with other necessary environment variables.
NextAuth is a flexible authentication library for Next.js applications that supports various authentication providers, including Google and Facebook. To implement the Google and Facebook login, you need to provide the corresponding client IDs and secret tokens in the environment variables.
Please refer to the NextAuth documentation for more detailed instructions on setting up NextAuth with Google and Facebook authentication providers.
Access https://economix.vercel.app
This project is under MIT licence. See the archive LICENSE to more details.
Made with π by IGS Design - Igor Santos π