/apiperiodictable

Project in testing phase at Vercel and Heroku access the README links

Primary LanguageJavaScript

API Periodic Table


Philipe-Js Philipe-Ts Philipe-Node Philipe-React

This API was born out of the need to use periodic table data.

Image that represent Home page from project

After scouring the internet for some API's to consume data from a periodic table and not finding it, I decided to create my own API.
Despite being a simple model where it is only possible via GET, it was still very challenging.
I hope it will be useful in some project and that it may have contributed in some way to the dissemination of such rich content.

How to access?

Backend

The backend of this project was built on NodeJS and hosted on Heroku.
access: https://apiperiodictable.herokuapp.com/
All API content is in the root path " .../ ", just access the link above and use the data through the GET method.

Frontend

The frontend is being built in NextJS using a payment API that in this case was linked to receive donations for the project.
This API is Stripe in version 20200827.
Hosting is provided by Vercel
access: https://apiperiodictable.vercel.app/

How Use

Super Easy

Just use tradicional methods of query a JSON document, you can set with axios or fetchAPI for javascript for exemple. The url for query api is: https://apiperiodictable.herokuapp.com/ she is a JSON format.

example the use with fetch

example the use with axios


Image with data from API Table Periodic

Technologies used!

The dependencies used in the project were:

Backend

  • Express
  • Cors
  • Body-Parser
  • Morgan
  • Nodemon

Frontend

  • NextJS
  • Typescript
  • React-Dom
  • React-Icons
  • Stripe
  • Sass

It was still necessary to install the Heroku CLI
Only after these steps was it possible to see the API working :)

Below is a table with the technologies and their versions.

Backend NodeJS Express Cors Body-Parser Morgan Nodemon
VERSIONS: 16.13.1 4.17.2 2.8.5 1.19.1 1.10.0 2.0.15
Frontend NextJS Typescript React-Dom React-Icons Stripe Sass
VERSIONS: 12.0.8 4.5.5 17.0.2 4.3.1 8.199.0 1.49.0

And the Database ?

Don't be disappointed when I say that all API information is being printed by a const db.
Located inside the database/database directory.
The structure chosen was the JSON format as shown below.

image that represent data struct from backend

Next steps 😃

So that this application reaches a more professional level:

  • MongoDB Database.
  • Buy your own domain.
  • Update application to TypeScript. (backend)
  • Insert more information for each element.
  • Invite people to participate in the project.