Useful code snippets to become Full Stack faster 🚀

Published: 2021-03-30 07:28:48

ScaleDynamics’s JavaScript Full Stack Playground is the first place where developers can code both frontend JavaScript and backend node.js directly in their browser. 

To ease the coding, instead of using HTTP and JSON between your front and your Node.js backend, in the playground you use JavaScript call and JavaScript objects. It helps you save time by writing less code and offers a unique experience of coding Full Stack without being a Full Stack.⚡🍻 - you’re kinda transforming into a super saiyan!

![Super saiyan](https://media.giphy.com/media/103ZH3eKKKCKo8/giphy.gif)

The growing Full Stack community of the Playground provides a high volume of code snippets which make it easier and quicker for other developers to learn, test and prototype ideas 🤩 
Here is the list of useful code snippets provided by the Playground’s Full Stack community which mainly focus on Node.js, React, MongoDB, Tensorflow.js… 

So, with no further ado, let get into it 😎✨

#Table of content
[React based apps](#chapter-1)
[Weather forecasting apps](#chapter-2)
[Database/Dashboard](#chapter-3)
[Tensorflow.js/AI](#chapter-4)

#React based apps <a name="chapter-1"></a>

####[React Hover card with REST API](https://playground.scaledynamics.com/?snippet=2bf46217-a2d7-47da-aba0-af67f57836ff)
This snippet was specifically built to demonstrate how to do a REST API on the backend and show the result on a hover card build with React.

####[React Hover card with JS Data](https://playground.scaledynamics.com/?snippet=60099f3985c335e1155d45af)
Another example of presenting personal information on hover cards. But this time, the snippet shows another way to do that using a Node.js backend providing JSON Data 😉

####[Location tracking by IP Adresse](https://playground.scaledynamics.com/?snippet=015c0b63-9965-4c2c-8600-ef45a58beabd)
Tracking visitor's geolocation on map using only its IP address.

#Weather forecasting apps 🌄🌦️☔ <a name="chapter-2"></a>
![weather forecasting](https://media.giphy.com/media/dxywOfwJmdEd0EIdgB/giphy.gif)

####[Get 5 days forecast](https://playground.scaledynamics.com/?snippet=60099f6e85c335e1155d45b0)
Open Weather Map is a set of APIs to get weather forecasts for multiple cities. A 5 days forecast is available at any location or city. It includes weather data every 3 hours. You’ll need a demo key from rapidAPI to be able to run the snippet.

####[GetCurrentWeather_V1](https://playground.scaledynamics.com/?snippet=60099ed085c335e1155d45ac)
Still using APIs from Open Weather Map, but with this snippet, you can get weather data in any location on the earth. The current weather data are updated online based on data from more than 40,000 weather stations. And just like the previous one, you’ll need a demo key to be able to run as well.

####[GetCurrentWeather_V2](https://playground.scaledynamics.com/?snippet=60099fb685c335e1155d45b2)
This one provides access to current weather data for any location on Earth including over 200,000 cities! 🤯 This snippet collects and processes weather data from different sources such as global and local weather models, satellites, radars and vast networks of weather stations. That looks cool to you, don’t you think? 😉

####[GetHistoricalWeatherData](https://playground.scaledynamics.com/?snippet=60099efc85c335e1155d45ad)
To get access to historical weather data for the 5 previous days. Parameters are composed with geographical coordinates (latitude, longitude) and DT date (unix time, UTC time zone).

####[Dark Sky Weather API](https://playground.scaledynamics.com/?snippet=60099f8285c335e1155d45b1)
This sample shows how to use a Weather Dark Sky REST API, to get a weather forecast at a specific location.

####[Weather forecast widget](https://playground.scaledynamics.com/?snippet=14cbe46f-0534-4380-a19b-cb35f0e042a8)
This snippet shows a forecasting widget that uses Open Weather Map API. You’ll need an API key from rapidapi.com, and subscribe to the Open Weather Map API.

#Database/Dashboard 📈📊 <a name="chapter-3"></a>
![Dataguy](https://media.giphy.com/media/GbH8vRmrNHdVZhouBt/giphy.gif)

####[Morris GraphLine](https://playground.scaledynamics.com/?snippet=6009a04685c335e1155d45b4)
This snippet shows a Morris graph line example. Graph config and data are sent by the backend and the frontend shows it. Add your data on the backend side to test and reuse it for your needs!

####[Dashboard](https://playground.scaledynamics.com/?snippet=849ff01d-82e6-42e2-96e0-f305b6eb990b)
This is a Dashboard example which could help you create a dashboard and visualize data easier.

####[Datatable](https://playground.scaledynamics.com/?snippet=a9c90126-8c6b-4297-92aa-44a9fd179b78)
Example of a data table that shows random user data. Sorting, filtering, and pagination enabled. Feel free to use it in your snippets to show your own data!

####[MongoDBMovies](https://playground.scaledynamics.com/?snippet=8d7a663c-3e56-4ef4-ab02-7164fa6e7706)
This example shows how to query a MongoDB movie database on the backend and show results. In this sample, the author fetches movies from the Sample Mflix Dataset provided by MongoDB Atlas.

####[Movie UI using MongoDB](https://playground.scaledynamics.com/?snippet=ea2e90f0-9f48-4fc7-9cde-4fff6e7722ea)
This snippet shows a use case of a frontend and a proxy backend that access a MongoDB database. The backend uses mongoDB to request the movie posters. The frontend part is based on https://codepen.io/cb2307/pen/XYxyeY.

####[Movie UI using MongoDB Scrollable](https://playground.scaledynamics.com/?snippet=5a44d438-5aac-46c0-b643-7f0da7b85df7)
This snippet is basically similar to the previous one, which also is to build a movies list page. But this time, it’s updated with scrollable feature and I bet it looks way cooler 😉

#Tensorflow.js/AI <a name="chapter-4"></a>
![AI](https://media.giphy.com/media/mCgBmqKzSeyochwlk0/giphy.gif)

####[Tensorflow.js interference](https://playground.scaledynamics.com/?snippet=60099fca85c335e1155d45b3)
This snippet shows how to use Tensorflow.js on the Node.js back-end side to apply furthermore on AI, through buildup and training of a simple sequential neural network.

####[Tensorflow toxicity detection](https://playground.scaledynamics.com/?snippet=954f0e33-74af-4dec-b4be-7ce180435398)
Another example for applying Tensorflow.js on your AI projects, this time, the author infers a pre-trained Tensorflow model for toxic words detection on the snippets, showing how to integrate that as a feature in your projects.

#### [Tensorflow.js face detection](https://playground.scaledynamics.com/?snippet=fd4df167-f325-4561-b567-c168d6691192)
This faces detection snippet streams video from a webcam live stream on the backend, and applies a black or blurred overlay on detected faces regions, either on frontend or backend. Images are passed (in or out) to the back-end as ArrayBuffer function arguments.
 
#### [Tensorflow.js sound spectrogram](https://playground.scaledynamics.com/?snippet=414ccc7c-2c44-44f5-9494-e467f56a225b)
This snippet streams audio from the device microphone and displays a live spectrogram, whose frequencies are computed on the frontend side with an audio API analyzer or on the backend side using tensorflow.js utility.

#### [Tensorflow.js sound speedup](https://playground.scaledynamics.com/?snippet=0caac392-e867-486f-b440-fbfee0d78de4)
This snippet performs sound/speech capture, increases sound speed on a server, using simply fixed time frames cross-fading algorithm, then plays it back on the device.
The code structure is quite similar to spectrogram snippets.


#Hop in, show off your snippets, and inspire others!

The JavaScript Full Stack Playground will remain FREE for public code snippets. You can easily create an account, get on it and start creating yours or playing with other people’s snippets to become Full Stack a lot faster than you think 😉 

The first step is very simple, just sign up for the FREE developer plan in [this link](https://scaledynamics.com/community-plan)

The playground is part of our Managed Web application platform for Node.js. We provide an SDK to build and deploy projects using the same coding approach (no HTTP/JSON, just JS calls and JS objects) 🦄

And if you feel it’s interesting and want to explore more about the tech or just to keep yourself updated, feel free to follow our social media. I guarantee that it’ll be fun, and you’ll never miss a single new snippet on the Playground  😎✨
[Twitter](https://twitter.com/ScaleDynDev)
[Facebook](https://www.facebook.com/scaledynamics.tech)
[Instagram](https://www.instagram.com/scaledynamicstech)

Also, to clearly and fully understand the tech behind the Playground, you can take a look at [this article](https://dev.to/scaledynamics/how-i-created-the-1st-full-stack-playground-ehf) in which our CEO explains how he created the Playground and its coding approach.

Stay tuned for cooler stuff coming!