This portfolio is made with NextJs
the main idea for this portfolio was because I saw a topographic-like design for my mouse pad, and I decided to make my portfolio around it.
This app was made by bootstrapping the create-next-app template, so it contains its development server and build utilities configured for this project specifically.
Use the next dev server to start a local development server in the port 3000
npm run dev
Or you can also run the build tool that's configured to build a static version of this site and place it in the /out
directory
npm run build
When you build your own version you should change the .github/workflows
folder, and make your own workflows. Since you don't have my poller API access, you might want to create your own poller or deploy it trough FTP somewhere else.
To install all the dependencies simply run.
npm install
When you configure your project dependencies you will need to clone the .env.example
file and fill it with the required environment variables.
API_GITHUB_TOKEN
: This token is used by the GitHub API all around the project, for the rate widget, the repositories widget, and the gists widget.API_SPOTIFY_AUTH
: This token is the generalSpotify
API token, you can get it in yourSpotify
developer profile after creating an app.API_SPOTIFY_REFRESH
: This token is the one you get when creating anOAuth
flow with your app scopes, you need to simulate as if you were a user trying to use the app, which technically you are.
For the Environment variables here are some useful pages I used to help me obtain the tokens.
- GitHub Access Token documentation: In this page you can read how to retrieve your
API_GITHUB_TOKEN
. - (Official
Spotify
API Authorization documentation)[https://developer.spotify.com/documentation/web-api/concepts/authorization]: In this page you can read the "official" authentication documentation, it is good so you can make yourself an idea of what you are working with. - (Stack overflow response)[https://stackoverflow.com/questions/60659902/how-to-get-oauth-token-from-spotify]: After reading this response I was able to get my
Spotify
tokens, as it explains how it works.
You may or may not notice that there is a polling system implemented in the site so the Spotify
widget can work. The implementation is proxied trough the NextJs
back-end, and made to appeal this discussion. The proxy system ensures only a request every 5 seconds is made, which is within the Spotify
API rate-limits. Now Spotify
is only giving web-socket access to million dollar companies like Discord, which most of us are not.