投稿時間:2022-04-29 18:19:58 RSSフィード2022-04-29 18:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Appleの整備済み商品情報 2022/4/29 https://taisy0.com/2022/04/29/156439.html apple 2022-04-29 08:24:09
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] キャンプを始めたきっかけ、1位は「子どもに経験させたいから」 キャンプギアの使用金額は? https://www.itmedia.co.jp/business/articles/2204/29/news058.html itmedia 2022-04-29 17:51:00
python Pythonタグが付けられた新着投稿 - Qiita KNIMEで自作の化合物の物性予測モデルを実行する https://qiita.com/kimisyo/items/1cb70e21c58eea52d59d dgllifesci 2022-04-29 17:53:32
js JavaScriptタグが付けられた新着投稿 - Qiita 【JavaScript】多次元配列を作成するシンプルな方法【ワンライナー】 https://qiita.com/YasumiYasumi/items/2a9d469f1c829df7945e javascript 2022-04-29 17:23:28
AWS AWSタグが付けられた新着投稿 - Qiita 入社3年目、業務以外の知識がない自分がGWを捧げてサービス・アプリケーションを勉強してみた!〜1日目AWS:IAMユーザ作成・前編〜 https://qiita.com/hugo-crt/items/40c4bcb883c74085e539 awsiam 2022-04-29 17:54:38
海外TECH DEV Community Song search application built using Typesense. https://dev.to/aviyel/song-search-application-built-using-typesense-19l7 Song search application built using Typesense Crafting search engines from absolute scratch which are typo tolerant effective and efficient is really very difficult A typographical error could cause a search to return nothing even if the requested item is in the database By obviating the need to develop a search engine Typesense could save a lot of time and effort Your users will also be able to use the search feature in your app effectively resulting in a positive user experience Typesense is an open source typo tolerant search engine for developers designed to cut down on the time it takes to find information quickly To learn more about typesense go to the following link What is Typesense This article will walk you through installing Typesense creating a new application from scratch preconfiguring the client and more This post will also show you how to construct a Typesense Collection Finally we ll start our app and initialize it then add an item to our collection and start searching Building a Song Search Application from scratch Typesense ConfigurationTypesense can be used by installing its prebuilt docker image which is already provided to us by Typesense or by using the Typesense cloud hosting solution which is the most straightforward way to get started To get started go to the Typesense cloud website and sign up with your Github account or use the docker method easily and directly We ll use the Docker method for the purposes of this tutorial To follow along with this tutorial go to the Typesense Dockerhub and download the prebuilt docker image then follow the instructions below docker pull typesense typesenseandmkdir tmp typesense datadocker run p v tmp data data typesense typesense data dir data api key songsearch enable cors listen port Building Search UIs from scratch Using the open source InstantSearch js library library or its React Vue and Angularjs as well as the Typesense InstantSearch Adapter you can create a plug and play full featured search interface with just a few lines of code Finally lets s actually build a search UI for our Application Step by step instructions for installingLet s begin with a basic template npx create instantsearch app typesense songsearch The name of the application or widget typesense songsearch InstantSearch template InstantSearch jsCreating a new InstantSearch app in typesense songsearch InstantSearch js version Application ID latency Search API key beffcdfaeaf Index name instant search Attributes to display Used to generate the default result template Attributes to display Used to filter the search interface Dynamic widgetsInstalling dependencies yarn install v info No lockfile found Resolving packages Fetching packages Linking dependencies Building fresh packages success Saved lockfile Done in s Created typesense songsearch at typesense songsearch Begin by typing cd typesense songsearch yarn start️Start building something awesome This is how your folder structure should look after you ve finished installing your Instantsearch app UI For the npx create instantsearch app command here are some setup suggestions Any of the web libraries supported by typesense can be used including InstantSearch js  React  Vue and Angular The default version of InstantSearch js can be used The application ID can be any string we ll be changing it later in the article Search API key any string later in the guide we ll replace this with the Typesense Search only API Key and Our index name is the name of the collection in Typesense and lastly leave the Displaying attributes as it is Next we ll need to install the Typesense InstantSearch adapter to use InstantSearch with a Typesense backend npm install typesense instantsearch adapter Installing Typesensenpm install typesenseWe re ready to create a Typesense collection Now that everything is installed and running we can create a Typesense collection index some documents in it and try searching for them Your package json file should look like this after you ve installed all of the necessary dependencies name typesense songsearch version private true main src app js scripts start parcel index html port build parcel build index html lint eslint lint fix npm run lint fix devDependencies babel eslint eslint eslint config algolia eslint config prettier eslint plugin import eslint plugin prettier parcel bundler prettier dependencies algoliasearch instantsearch js typesense typesense instantsearch adapter As you can see it s a very basic app with only two important files  app js and index html which contains the structure of our entire app In the index html file you can see an id We can use those ids to attach UI components such as a searchbox  results and facets if you want to include them as well as pagination widgets lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset utf gt lt meta name viewport content width device width initial scale shrink to fit no gt lt meta name theme color content gt lt link rel manifest href manifest webmanifest gt lt link rel shortcut icon href favicon png gt lt link rel stylesheet href themes algolia min css gt lt link rel stylesheet href src index css gt lt link rel stylesheet href src app css gt lt title gt typesense songsearch lt title gt lt head gt lt body gt lt header class header gt lt h class header title gt lt a href gt typesense songsearch lt a gt lt h gt lt p class header subtitle gt using lt a href gt InstantSearch js lt a gt lt p gt lt header gt lt div class container gt lt div class search panel gt lt div class search panel filters gt lt div id dynamic widgets gt lt div gt lt div gt lt div class search panel results gt lt div id searchbox gt lt div gt lt div id hits gt lt div gt lt div gt lt div gt lt div id pagination gt lt div gt lt div gt lt script src dist algoliasearch lite umd js gt lt script gt lt script src gt lt script gt lt script src src app js gt lt script gt lt body gt lt html gt As you can see below the app js file is configured for algolia and we ll need to change that for typesense app jsconst algoliasearch instantsearch window const searchClient algoliasearch latency songsearch const search instantsearch indexName instant search searchClient search addWidgets instantsearch widgets searchBox container searchbox instantsearch widgets hits container hits instantsearch widgets configure facets maxValuesPerFacet instantsearch widgets dynamicWidgets container dynamic widgets fallbackWidget container attribute return instantsearch widgets refinementList container attribute widgets instantsearch widgets pagination container pagination search start To use InstantSearch with a Typesense backend we ll need to install the Typesense InstantSearch adapter To do so simply open a terminal window and type the following command into it If you ve already installed it you can skip this step npm install save typesense instantsearch adapterFinally the project can be adjusted to use Typesense In the background we ve got our typesense instance up and running Open src app js and change the way InstantSearch is initialized to get InstantSearch js to use the Typesense adapter const searchClient algoliasearch latency songsearch const search instantsearch indexName instant search searchClient to thisconst typesenseInstantsearchAdapter new TypesenseInstantSearchAdapter server apiKey songsearch nodes host localhost port protocol http additionalSearchParameters queryBy title primary artist name album name quering by const searchClient typesenseInstantsearchAdapter searchClient const search instantsearch searchClient indexName songs Now we need to import our songs data so create a dataset folder and inside it create your own songs json file filling it with all of the necessary song information or download the songs dataset from here Finally your folder structure should look something like this Let s get to work on the data importing scripts We ll start by creating a file called loadData js and we will export and initialize the typesense client inside but before we do that we need to install a few packages lodash and fast json stringify npm i lodashandnpm i fast json stringifySo at the very top import all of the dependencies that this script requires to run as shown below loadData jsconst require lodash const fastJson require fast json stringify const fs require fs const readline require readline const Typesense require typesense After that Create a stringify based on the schema of the documents that need to be stringified loadData jsconst require lodash const fastJson require fast json stringify const fs require fs const readline require readline const Typesense require typesense const stringify fastJson title Song Schema type object properties track id type string title type string album name type string nullable true primary artist name type string genres type array items type string country type string release date type integer release decade type string release group types type array items type string urls type array items type object properties type type string url type string Create a new extractUrls function function extractUrls parsedRecord return parsedRecord relations filter r gt amazon asin streaming free streaming download for free purchase for download includes r type map r gt return type r type url r url resource Now create an asynchronous addSongsToTypesense function and copy the code exactly as it is shown below This function will simply index all of the songs into Typesense and if an error occurs during the process it will simply log an error async function addSongsToTypesense songs typesense songsCollection try const returnDataChunks await Promise all chunk songs Math ceil songs length CHUNK SIZE map songsChunk gt const jsonlString songsChunk map song gt stringify song join n return typesense collections songsCollection documents import jsonlString const failedItems returnDataChunks map returnData gt returnData split n map r gt JSON parse r filter item gt item success false flat if failedItems length gt throw new Error Error indexing items JSON stringify failedItems null catch error console log error A Collection in Typesense is a set of related Documents that functions similarly to a table in a relational database We give a collection a name and describe the fields that will be indexed when a document is added to the collection when we create it Now go to the loadData js file and add the following changes to the code module exports async gt const typesense new Typesense Client nodes host localhost port protocol http apiKey songsearch const songsCollection songs const schema name songsCollection fields name track id type string name title type string name album name type string optional true name primary artist name type string facet true name genres type string facet true name country type string facet true name release date type int name release decade type string facet true name release group types type string facet true default sorting field release date console log Populating data in Typesense songsCollection collection console log Creating schema await typesense collections create schema console log Songs records const fileStream fs createReadStream DATA FILE const rl readline createInterface input fileStream crlfDelay Infinity let songs let currentLine for await const line of rl currentLine const parsedRecord JSON parse line try songs push parsedRecord media map media gt media tracks flat filter track gt track To remove nulls map track gt const releaseDate Math round Date parse parsedRecord release group first release date Be sure to update the schema passed to stringify when updating this structure const song track id track id title track title album name parsedRecord title primary artist name parsedRecord artist credit artist name genres track recording genres map g gt g name parsedRecord genres map g gt g name parsedRecord release group genres map g gt g name map firstChar rest gt firstChar toUpperCase rest join toLowerCase country parsedRecord country Unknown release date releaseDate release decade Math round new Date releaseDate getUTCFullYear s release group types parsedRecord release group primary type Unknown parsedRecord release group secondary types null flat filter e gt e urls extractUrls parsedRecord process stdout write return song catch e console error e console error parsedRecord throw e if currentLine gt MAX LINES break if songs length gt await addSongsToTypesense songs typesense songsCollection console log ALL songs INDEXED If an error occurs while loading the data simply add the following snippet of code to the loadData js file before creating songSchema await typesense collections songs delete This is how your final code should look like loadData jsconst require lodash const fastJson require fast json stringify const fs require fs const readline require readline const Typesense require typesense const stringify fastJson title Song Schema type object properties track id type string title type string album name type string nullable true primary artist name type string genres type array items type string country type string release date type integer release decade type string release group types type array items type string urls type array items type object properties type type string url type string const BATCH SIZE const CHUNK SIZE const MAX LINES Infinity const DATA FILE dataset songs json function extractUrls parsedRecord return parsedRecord relations filter r gt amazon asin streaming free streaming download for free purchase for download includes r type map r gt return type r type url r url resource async function addSongsToTypesense songs typesense songsCollection try const returnDataChunks await Promise all chunk songs Math ceil songs length CHUNK SIZE map songsChunk gt const jsonlString songsChunk map song gt stringify song join n return typesense collections songsCollection documents import jsonlString const failedItems returnDataChunks map returnData gt returnData split n map r gt JSON parse r filter item gt item success false flat if failedItems length gt throw new Error Error indexing items JSON stringify failedItems null catch error console log error module exports async gt const typesense new Typesense Client nodes host localhost port protocol http apiKey songsearch await typesense collections songs delete const songsCollection songs const schema name songsCollection fields name track id type string name title type string name album name type string optional true name primary artist name type string facet true name genres type string facet true name country type string facet true name release date type int name release decade type string facet true name release group types type string facet true default sorting field release date console log Populating data in Typesense songsCollection collection console log Creating schema await typesense collections create schema console log Songs records const fileStream fs createReadStream DATA FILE const rl readline createInterface input fileStream crlfDelay Infinity let songs let currentLine for await const line of rl currentLine const parsedRecord JSON parse line try songs push parsedRecord media map media gt media tracks flat filter track gt track To remove nulls map track gt const releaseDate Math round Date parse parsedRecord release group first release date Be sure to update the schema passed to stringify when updating this structure const song track id track id title track title album name parsedRecord title primary artist name parsedRecord artist credit artist name genres track recording genres map g gt g name parsedRecord genres map g gt g name parsedRecord release group genres map g gt g name map firstChar rest gt firstChar toUpperCase rest join toLowerCase country parsedRecord country Unknown release date releaseDate release decade Math round new Date releaseDate getUTCFullYear s release group types parsedRecord release group primary type Unknown parsedRecord release group secondary types null flat filter e gt e urls extractUrls parsedRecord process stdout write return song catch e console error e console error parsedRecord throw e if currentLine gt MAX LINES break if songs length gt await addSongsToTypesense songs typesense songsCollection console log ALL songs INDEXED Finally type node loadData js into the terminal of that same project directory and you have successfully imported thousand songs documents into the search index Now you can start your application by typing npm start in the terminal of that project directory We need to fix the fact that the application functions perfectly but no information as well as data is displayed in it So to fix it go to our app js file and remove a few of the widgets that we don t need so the app js file should look something like this app jsconst instantsearch window import TypesenseInstantSearchAdapter from typesense instantsearch adapter const typesenseInstantsearchAdapter new TypesenseInstantSearchAdapter server apiKey songsearch nodes host localhost port protocol http additionalSearchParameters queryBy title primary artist name album name quering by const searchClient typesenseInstantsearchAdapter searchClient const search instantsearch searchClient indexName songs search addWidgets instantsearch widgets searchBox container searchbox instantsearch widgets hits container hits instantsearch widgets pagination container pagination search start Simply re run the application after you ve fixed it and your application should now look like this You can now build a search interface using any of the InstantSearch widgets and we ll be adding a template to present the data in a pleasing manner Simplycopy the template code below and add it inside the  hits widget present inside app js file templates item lt h gt attribute title lt h gt lt div gt by lt a style color FFF gt attribute primary artist name lt a gt lt div gt lt div gt Album lt a style color d gt attribute album name lt a gt lt div gt lt div class text muted small mb gt lt div gt app js file should resemble something like this App jsconst instantsearch window import TypesenseInstantSearchAdapter from typesense instantsearch adapter const typesenseInstantsearchAdapter new TypesenseInstantSearchAdapter server apiKey songsearch nodes host localhost port protocol http additionalSearchParameters queryBy title primary artist name album name quering by const searchClient typesenseInstantsearchAdapter searchClient const search instantsearch searchClient indexName songs search addWidgets instantsearch widgets searchBox container searchbox instantsearch widgets hits container hits templates item lt h gt attribute title lt h gt lt div gt by lt a style color FFF gt attribute primary artist name lt a gt lt div gt lt div gt Album lt a style color d gt attribute album name lt a gt lt div gt lt div class text muted small mb gt lt div gt instantsearch widgets pagination container pagination search start After you ve fixed it re run the application and your app should now look like this Simply add the following code above the  hits widgets inside the app js file to configure the hits per page or to configure to your own requirements instantsearch widgets configure hitsPerPage So now let s try to add the facets to do that we ll add an instant search widgets In the instantsearch library this is called refinementlist and finally we have to specify the container in our case let s call it a  genreFilter artistFilter and then the attribute we want to take in our case let s call it genres and primary artist name respectively So our final code should look like this app jsconst instantsearch window import TypesenseInstantSearchAdapter from typesense instantsearch adapter const typesenseInstantsearchAdapter new TypesenseInstantSearchAdapter server apiKey songsearch nodes host localhost port protocol http additionalSearchParameters queryBy title primary artist name album name quering by const searchClient typesenseInstantsearchAdapter searchClient const search instantsearch searchClient indexName songs search addWidgets instantsearch widgets searchBox container searchbox instantsearch widgets configure hitsPerPage instantsearch widgets hits container hits templates item lt h gt attribute title lt h gt lt div gt by lt a style color FFF gt attribute primary artist name lt a gt lt div gt lt div gt Album lt a style color d gt attribute album name lt a gt lt div gt lt div class text muted small mb gt lt div gt instantsearch widgets refinementList container genreFilter attribute genres searchable true searchablePlaceholder Search genres showMore true instantsearch widgets refinementList container artistFilter attribute primary artist name searchable true searchablePlaceholder Search Artist showMore true instantsearch widgets pagination container pagination search start and our index html file should look something like this lt index html gt lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset utf gt lt meta name viewport content width device width initial scale shrink to fit no gt lt meta name theme color content gt lt link rel manifest href manifest webmanifest gt lt link rel shortcut icon href favicon png gt lt link rel stylesheet href themes algolia min css gt lt link rel stylesheet href src index css gt lt link rel stylesheet href src app css gt lt title gt typesense songsearch lt title gt lt head gt lt body gt lt header class header gt lt h class header title gt lt a href gt typesense songsearch lt a gt lt h gt lt p class header subtitle gt using lt a href gt InstantSearch js lt a gt lt p gt lt header gt lt div class container gt lt div class search panel gt lt div class search panel filters gt lt div id genreFilter gt lt div gt lt br gt lt div id artistFilter gt lt div gt lt div gt lt div class search panel results gt lt div id searchbox gt lt div gt lt div id hits gt lt div gt lt div gt lt div gt lt div id pagination gt lt div gt lt div gt lt script src dist algoliasearch lite umd js gt lt script gt lt script src gt lt script gt lt script src src app js gt lt script gt lt body gt lt html gt This is how your application should look like Finally we can add sorting functionality to the app by repeating the exact steps above add the sortBy widget specify the container with  sort songs specify the items with the label default with the value songs and then create another label called Recent songs with the value songs sort release date asc and another label called Oldest songs with the value songs sort release date dsc instantsearch widgets sortBy container sort songs items label Default value songs label Recent songs value songs sort release date asc label Oldest songs value songs sort release date desc Finally update and add sort songs id before the searchbox inside index html file lt index html gt lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset utf gt lt meta name viewport content width device width initial scale shrink to fit no gt lt meta name theme color content gt lt link rel manifest href manifest webmanifest gt lt link rel shortcut icon href favicon png gt lt link rel stylesheet href themes algolia min css gt lt link rel stylesheet href src index css gt lt link rel stylesheet href src app css gt lt title gt typesense songsearch lt title gt lt head gt lt body gt lt header class header gt lt h class header title gt lt a href gt typesense songsearch lt a gt lt h gt lt p class header subtitle gt using lt a href gt InstantSearch js lt a gt lt p gt lt header gt lt div class container gt lt div class search panel gt lt div class search panel filters gt lt div id genreFilter gt lt div gt lt br gt lt div id artistFilter gt lt div gt lt div gt lt div class search panel results gt lt div id sort songs gt lt div gt lt div id searchbox gt lt div gt lt div id hits gt lt div gt lt div gt lt div gt lt div id pagination gt lt div gt lt div gt lt script src dist algoliasearch lite umd js gt lt script gt lt script src gt lt script gt lt script src src app js gt lt script gt lt body gt lt html gt Let s take a look at the finished product of our typesense integrated songsearch application The entire source code of the application can be found hereTypesense was built with several distinctive features primarily aimed at making the developer s job easier while also giving customer as well as user the ability to provide a better search experience as possible This article may have been entertaining as well as instructive in terms of how to create a fullstack song search app using typesense from the ground Join Aviyel s community to learn more about the open source project get tips on how to contribute and join active dev groups Aviyel is a collaborative platform that assists open source project communities in monetizing and long term sustainability To know more visit Aviyel com and find great blogs and events just like this one Sign up now for early access and don t forget to follow us on our socials 2022-04-29 08:39:44
海外TECH DEV Community AWS open source news and updates, #110 https://dev.to/aws/aws-open-source-news-and-updates-110-2ldk AWS open source news and updates April th Instalment Newsletter Welcome to edition of the AWS open source newsletter It has been a busy week with the AWS Summit London happening this week where I was lucky enough to do a session on Apache Airflow meaning I am publishing this a little later than I had planned We have more great new projects this week including a project that helps make it easier to deploy your static and dynamic applications a tool that provides help in managing the long term health of your AWS Data Lake a cool project to help you replicate data from a Kinesis Data Stream across regions a nice CloudWatch dashboard widget that summarises your CloudFormation stacks and many more so check them out This week also features content covering a broad range of open source topics including AWS CloudFormation Guard KubeFlow Semgrep Steampipe Terraform Apache Spark Kubernetes Karpenter PostgreSQL Linux Istio Apache Airflow Hugging Face ROS and many more There a strong theme of security compliance in some of the topics so if this is something you are looking at how open source can help you will find these helpful Video content this week includes a detailed look at AWS EKS Blueprints for Terraform as well as an updated on the latest AWS CDK release and a zero to hero workshop if you want to get started and its in Python yay Finally don t forget to check out the events KubeCon is just around the corner but we are also in the AWS Summit season and we will have plenty of great open source content so hope to see you Do you have an interesting open source project you want to share As always if you are working on anything interesting you would like me to include in this weekly round up please drop me a line at ricsue amazon com Celebrating open source contributorsThe articles posted in this series are only possible thanks to contributors and project maintainers and so I would like to shout out and thank those folks who really do power open source and enable us all to build on top of what they have created So thank you to the following open source heroes Mahalingam Sivaprakasam Abhinav Krishna Vadlapatla Matthew Bonig Ed Miller Melody Yang Kinnar Kumar Sen Dakota Riley David Boeke Bob Tordella Jon Udell Nathan Wallace Kanwaljit Khurmi Meghna Baijal Suraj Kota Joaquin Manuel Rinaudo Laimonas Sutkus and Hassan Tahhan Make sure you find and follow these builders and keep up to date with their open source projects and contributions Latest open source projects Communitycontent delivery democontent delivery demo this project from Hassan Tahhan demonstrates how to accelerate distribution of your static and dynamic content in a secure scalable and repeatable way using Amazon CloudFront Amazon S Amazon EC Application Load Balancer ALB Amazon VPC and AWS CloudFormation Other AWS services used are Amazon CloudWatch AWS Lambda AWS IAM and AWS SDK for Python Boto Toolsaws dataset ingestion metrics collection frameworkaws dataset ingestion metrics collection framework this open source framework helps you to enforce long term health of your AWS Data Lake by providing visibility into operational data quality and business metrics aws stfaws stf The Smart Territory Framework STF is a set of tools and standardized modules that our partners and customers can assemble together to build and operate sustainable and highly effective solutions in line with global industry standards and based on the open source offering of the FIWARE ecosystem Check out the detailed README for more info including some helpful videos that go into more detail about FIWARE and how this project aligns Demos Samples and Workshopskinesis data streams replication using kinesis data analytics studiokinesis data streams replication using kinesis data analytics studio It can be desirable to replicate data from a Kinesis Data Stream in Region A to Region B for many reasons including Disaster Recovery Resiliency migration to another region or simply making data available in both regions for separation of concerns In this repository we showcase how to replicate data between regions using Kinesis Data Analytics Studio a managed Apache Flink SQL interactive environment using Apache Zeppelin cfn stack summary widgetcfn stack summary widget This repository demonstrates how to create a CloudWatch dashboard widget that provides an HTML summary of one or more CloudFormation stacks The summary lists important resources along helpful links to the AWS console aws iot thingworxaws iot thingworx This open source solution is designed to allow Things connected to AWS IotCore publishing MQTT messages to connect to an instance of Thingworx server end to end workshop for computer visionend to end workshop for computer vision this is an end to end CV MLOps workshop aimed to help Machine Learning ML and Data Science DS teams build relevant AWS and SageMaker competencies for an enterprise scale solution The content is derived from a real world CV use case where an image classification model is developed and trained on SageMaker and then deployed to an edge computing devices AWS and Community blog postsSteampipeSteampipe is an open source tool under the AGPLv license for querying cloud APIs in a universal way and reasoning about the data in SQL David Boeke Bob Tordella Jon Udell and Nathan Wallace have come together to pen the post Compliance auditing with Steampipe and SQL This is a follow up to a previous post that explored how to use Steampipe to query your AWS environments and in this post they share how Steampipe s Compliance “mod enables you to query your AWS infrastructure to check against a number of compliance with regulatory frameworks This is a really cool project so you should check this out hands on SemgrepSemgrep short for Semantic Grep is a fast lightweight and open source static analysis tool for finding bugs and automating code reviews In the blog post Using SemGrep to find security issues and misconfigurations in AWS Cloud Development Kit projects Dakota Riley Principal Security Engineer at Aquia explores how you can apply static code analysis with Semgrep to the AWS Cloud Development Kit to find security misconfigurations This is a great post and I am going to try out some of these against my own CDK stacks to see how well they faire hands on AWS CloudFormation GuardAWS CloudFormation Guard is an open source general purpose policy as code evaluation tool It provides developers with a simple to use yet powerful and expressive domain specific language DSL to define policies and enables developers to validate JSON or YAML formatted structured data with those policies In the post Extend your pre commit hooks with AWS CloudFormation Guard Joaquin Manuel Rinaudo shows you how to extend your Git hooks to validate your AWS CloudFormation templates against policy as code rules by using AWS CloudFormation Guard This can help you verify that your code follows organisational best practices for security compliance and more by preventing you from commit changes that fail validation rules hands on BearCam ProjectAWS Community Builder Ed Miller has put together his first post in the AWS Community Builder channel on Dev to looking at a new project that he is going to open source that certainly got my attention The BearID project is an initiative to explore how noninvasive technologies can help identify and monitor bears facilitating their conservation Ed has laid out some of his thinking for his idea but is looking for feedback and potentially collaborators If you love bears and have some spare cycles why not get in touch Read the post BearCam Companion Apache SparkMelody Yang and Kinnar Kumar Sen share how you can run Apache Spark workloads faster and cheaper with Amazon EMR on EKS when compared to Apache Spark on Amazon EKS without making any application changes in their post Amazon EMR on Amazon EKS provides up to lower costs and up to performance improvement for Spark workloads Using the TPC DS datasets at TB scale to benchmark this is worth while reading if you are running any Apache Spark workloads on AWS KubeflowKubeflow is the open source machine learning ML platform dedicated to making deployments of ML workflows on Kubernetes simple portable and scalable In the post Build and deploy a scalable machine learning system on Kubernetes with Kubeflow on AWS Kanwaljit Khurmi Meghna Baijal and Suraj Kota demonstrate Kubeflow on AWS an AWS specific distribution of Kubeflow and the value it adds over open source Kubeflow through the integration of highly optimised cloud native enterprise ready AWS services hands on IstioAddressing latency and data transfer costs on EKS using Istio takes a look at data transfer charges in your Amazon EKS clusters Mahalingam Sivaprakasam and Abhinav Krishna Vadlapatla explore one approach using Itsio that might help reduce costs while operating your workloads on Amazon EKS at production scale hands on Other posts worth checking outSimplifying Kubernetes Observability with Amazon EKS Blueprints walks you through building an EKS Blueprint cluster containing the New Relic EKS Blueprints add on for Kubernetes observability hands on Automatically create customized AppStream Linux images shows how you can set up a serverless automation pipeline to create a customised AppStream Amazon Linux AL based imagesDisaster recovery failover scenarios for your Amazon Aurora global database with Terraform Part walks you through three failover scenarios available for the Aurora global database using the Terraform Amazon Aurora module hands on PostgreSQL psql client tool commands equivalent to Oracle SQL Plus client tool is a handy cheat sheet to help you adjust from SQL Plus to psqlBuild a custom Java runtime for AWS Lambda will show you how you can create your own optimised Java runtime for AWS Lambda allowing you to tailor your Java runtime to your application needsBuild and Simulate Robotics Applications in AWS Cloud covers how to use AWS Cloud for Robot Operating System ROS based robotics development and testing including tools like Rviz Gazebo etc Identify paraphrased text with Hugging Face on Amazon SageMaker is a hands on guide on how to build a paraphrase identification model using Hugging Face transformersCase StudiesHow SailPoint solved scaling issues by migrating legacy big data applications to Amazon EMR on Amazon EKS looks at how SailPoint updated its platform for big data operations and solved scaling issues by migrating legacy big data applications to Amazon EMR on Amazon EKSHow Moovit turns data into insights to help passengers avoid delays using Apache Airflow and Amazon SageMaker explores how Moovit built an automated pipeline to train and deploy BERT models which classify public transportation service alerts in multiple metropolitan areas using Apache Airflow to orchestrate the different steps Quick updatesAmazon Linux Amazon Elastic Container Service Amazon ECS today announced the public preview of the Amazon ECS optimized Amazon Linux Amazon Machine Image AMI Amazon Linux AL is the next generation of Amazon Linux from Amazon Web Services AWS that is designed to provide a secure stable and high performance execution environment to develop and run your cloud applications Starting with AL a new Amazon Linux major version will be available every two years and each major version will be supported for five years Amazon ECS will publish Amazon ECS optimized AMIs to support the same year release and year support cycle for every new major Amazon Linux version The two year major release cycle helps you keep your software up to date while the five year support commitment for each major release gives you the stability you need to manage long project lifecycles AL is based on the Fedora project and provides frequent and flexible quarterly updates AL also locks to a specific version of the Amazon Linux package repository which gives you control over how and when you absorb updates In addition AL also comes with Security Enhanced Linux SELinux policies for additional isolation Furthermore the Amazon ECS optimized AL AMI now uses cgroupsV as the default kernel setting for managing Task and container resources which enables improved memory management KarpenterAmazon Elastic Kubernetes Service EKS is announcing v of the Karpenter open source cluster autoscaling project Karpenter is a flexible high performance Kubernetes cluster autoscaler that helps improve application availability and resource utilisation Karpenter v adds supports for Kubernetes podAffinity and podAntiAffinity scheduling constraints which increases its compatibility with popular third party Helm charts and expands support for high availability use cases Karpenter v is the latest release since the project s launch at re Invent On January Karpenter v added support for volume topology aware scheduling enabling its use with stateful Kubernetes workloads On March Karpenter v made it easier to customise the compute provisioned by removing the need for custom EC launch templates including when using Bottlerocket as the OS With the v release Karpenter fully supports workloads that use Kubernetes podAntiAffinity to achieve better availability by spreading pods across multiple hosts or availability zones AWS CDKMatthew Bonig has put together a short video to share news about release of AWS CDK covering highlights and showing examples of some of the new features in the AWS CDK Videos of the weekAWS EKS Blueprints for TerraformThe Containers from the Couch crew take a look at the new Amazon EKS Blueprints for Terraform modules and how they can help you manage your Kubernetes clusters AWS CDK Workshop From Zero to HeroThis online workshop is presented by Laimonas Sutkus the CTO of Biomapas and he shows you how to get started with AWS CDK It is a long session but covers a lot of topics and uses Python which makes me happy as I typically see TypeScript workshops so if you are a Python developer this becomes a must watch Events for your diaryAWS Berlin SummitMay th thAside from the AWS open source sessions including me again talking about Apache Airflow we will have our very own Spot and myself manning the open source booth Really looking forward to this and would love to see you come down and share your open source projects on our booth AWS Berlin Summit registration pageKubeConMay th th Valencia SpainThe Cloud Native Computing Foundation s flagship conference gathers adopters and technologists from leading open source and cloud native communities in Valencia Spain from May I will be there with many of the open source team and other AWS colleagues so if you are going make sure you swing by the AWS Booth Find out more about the event here GitOpsCon EuropeMay th Valencia SpainGitOpsCon Europe is designed to foster collaboration discussion and knowledge sharing on GitOps This event is aimed at audiences that are new to GitOps as well as those currently using GitOps within their organisation Get connected with others that are passionate about GitOps Learn from practitioners about pitfalls to avoid hurdles to jump and how to adopt GitOps in your cloud native environment The event is vendor neutral and is being organised by the CNCF GitOps Working Group Topics include getting started with GitOps scaling and managing GitOps lessons learned from production deployments technical sessions and thought leadership Read more about this from the official page here CDK DayMay th VirtualThis is a community organised event about AWS CDK cdktf projen and cdks This will be third year they run this event and if the previous two are anything to go by this will be essential viewing live streamed via You Tube Check out and register for the event over at their home page at BOSC July Madison Wisconsin USAThe Bioinformatics Open Source Conference BOSC has been held annually since and this year AWS is proud to be a platinum sponsor for this event BOSC covers all aspects of open source bioinformatics software and open science including but not limited to these topics Open Science and Reproducible Research Open Biomedical Data Citizen Participatory Science Standards and Interoperability Data Science Workflows Open Approaches to Translational Bioinformatics Developer Tools and Libraries Inclusion and Outreach and Training This is a hybrid event in person virtual and you find out more by checking out the event page BOSC OpenSearchEvery Tuesday pm GMTThis regular meet up is for anyone interested in OpenSearch amp Open Distro All skill levels are welcome and they cover and welcome talks on topics including search logging log analytics and data visualisation Sign up to the next session OpenSearch Community Meeting FebOpenSearchCon Sept st SeattleCome to the first annual OpenSearchCon This day long conference will be packed with presenters who build and innovate with OpenSearch It doesn t matter if you re just getting started on your OpenSearch journey running giant clusters or contributing tons of code the event is for everyone Join us to celebrate the progress and look into the future of the project Admission is free and registration will be open in the next few weeks All you will need to do is sign up and get to Seattle Check out the full details including signing up and location at the meetup page here Stay in touch with open source at AWSI hope this summary has been useful Remember to check out the Open Source homepage to keep up to date with all our activity in open source by following us on AWSOpen 2022-04-29 08:37:11
海外TECH DEV Community WebSocket vs Server-Sent events https://dev.to/minompi/websocket-vs-server-sent-events-2b77 WebSocket vs Server Sent eventsUsually I have heard more times the term WebSocket than server sent events The reason could be that WebSocket is used more but not always is the ideal approach Sometimes Server sent events approach is better to solve problems and create good applications It s very important to understand differences limits and ideal cases for both to solve your problem with the right solution Sometimes we have a cognitive bias that doesn t allow us to take the right decision Cognitive bias is a systematic error in thinking that occurs when people are processing and interpreting information in the world around them and affects the decisions and judgments that they make Image from So for example if we have solved a problem using WebSocket next time with a similar problem we could think that again it s the right approach without considering the big picture all information about the problem to solve For that reason understanding deeply bot approaches can help us to reduce the cognitive bias and make the best decision Let s try to explain both approaches and their characteristics WebsocketIt s a computer communications protocol that provides full duplex communication channels over a single TCP connection Wikipedia The protocol was standardized in The WebSocket approach is used in many contexts and projects because has many benefits and pros in its favor Bidirectional communicationThe client and server can both send data to the other part The client creates a TCP connection to the server and keeps it open as long as needed Both server and client can close the connection easily whenever they want To exchange data there is a handshake process that verifies the communication and if it s all ok they can exchange data using the custom WebSocket protocol Image from AdvantagesBidirectional communication in real time connections can both send and receive data from the browser example chat Generally don t use XmlHttpRequest and headers are not sent every time so it reduces the expensive data loads being sent to the server Can transmit both binary data and UTF format LimitsWhen connections are terminated WebSocket doesn t automatically recover them you need to implement a reconnection system by yourself Browsers older than don t support WebSocket connections Some enterprise firewalls with packet inspection have trouble dealing with WebSocket Ideal casesChat both client and server exchange data to send and receive messagesMultiplayer gamesCollaborative editing codingSocial feedsSport updates…a lot more … Server Sent EventsIt s a server push technology enabling a client to receive automatic updates from a server via an HTTP connection It was born on September so it s been a while since it s available It provides a memory efficient implementation of XHR streaming Unlike a raw XHR connection which buffers the full received response until the connection is dropped an SSE connection can discard processed messages without accumulating all of them in memory Monodirectional communicationThe client sends a request to subscribe to a specific channel and the server will send event data into that request so only the server can send data and the client receive automatically those events in the same HTTP connection Image from AdvantagesTransported over simple HTTP instead of a custom protocolSimpler protocolBuilt in support for re connection and event idNo troubles with corporate firewalls doing packet inspection LimitsIt s limited to UTF and does not support binary data It s subject to limitation with regards to the maximum number of open connections This can be especially painful when opening various tabs as the limit is per browser and set to a very low number It s mono directionalIt doesn t have native browser support However there are available workaround with poly fill replicate an API in Javascript that simulates the SSE functionality to solve this issue All modern browsers support server sent events Firefox Google Chrome Opera Safari Microsoft Edge Ideal casesStock client updates the client receives updates from the server when a stock changes its valueTwitter feed updates the client receives a new tweet every time one is sentpush notifications ConclusionIn conclusion both approaches are valid and can be used to build specific software Websocket is more used and can be used also to develop an application that can use Server sent events Server sent Events have fewer ideal cases but for them it s very useful with less configuration and less time to create the updating system I have used both of them and no one is better than another it depends on the specific context and what you need at that moment Knowing WebSocket and Server sent events can help you in deciding which approach is better for every application 2022-04-29 08:25:37
海外TECH DEV Community Fullstack ecommerce site using Nextjs, Supabase, prisma and chatwoot. https://dev.to/aviyel/fullstack-ecommerce-site-using-nextjs-supabase-prisma-and-chatwoot-2j8e Fullstack ecommerce site using Nextjs Supabase prisma and chatwoot We will be building SuperbaseEcommerce fullstack application in this article tutorial This application is simply an online ecommerce shopping site where users can browse all of the products upload their own products and even purchase the products This functionality will be added in the next series of articles It is similar to an Amazon app but it is simpler because we will not implement any actual payment or shipping procedures Here s a live demonstration of the final version of the app This is how your app should look after you finish this tutorial Feel free to experiment with it to get a sense of all the features we will be implementing Live Demo gt So in this tutorial we ll learn how to build this full stack app with Next js the react framework NextAuth js for implementing passwordless and OAuth authentication Supabase for persisting app data into a PostgreSQL database and stashing media files and information and Prisma for making it simple to read and write data from and to the database from our app This article tutorial covers many topics and technical concepts necessary to build a modern full stack app even if this app is a simplified version of a more advanced ecommerce site like Amazon You should be able to use all of the technologies covered in this tutorial including react nextjs prisma supabase and others but most importantly you should be able to build any full stack app using those technologies You ll go at your own speed and intensity with us guiding you along the way After completing this guide the goal of this article is to provide you with the tools and techniques you ll need to build a similar app on your own To put it another way this tutorial will not only teach you how to use those technologies in great detail but it will also provide you with the proper mixture of principles and application to help you grasp all of the key concepts so that you can proudly build your own apps from scratch later part on this article Let s start with the react portion and build our application The first step is to install Node js if it isn t already on your computer So go to the official Node js website and download the most recent version Node js is required to use the node package manager abbreviated as npm Now launch your preferred code editor and navigate to the folder For this article tutorial we ll be using the VScode code editor Setting up SupabaseEcommerce project There is a Github repository dedicated to this project which consists of three branches Clone the SupabaseEcommerce starter branch to get started The Main branch contains the entire final source code of the application so clone the SupabaseEcommerce starter branch if you want to follow along with this tutorial git clone branch SupabaseEcommerce starter After that head over to the cloned directory and install the dependencies before starting the Next js development server cd SupabaseEcommerceyarn add allyarn devYou can now check if everything is working properly by going to http localhost and editing pages index js then viewing the updated result in your browser For more information on how to use create next app you can review the create next app documentation It usually only takes a few minutes to get everything set up So for this project we will be using yarn to add packages to a project which will install and configure everything for us so that we can get started right away with an excellent starter template It s time to start our development server so head over to that SupabaseEcommerce folder and type yarn add all and then yarn dev and the browser will instantly open our starter template Next js appplication Your application s folder structure should look something like this So you might be curious about the source of the content Remember that all of our source code is housed in the pages folder and react next will inject it into the root div element Let s take a look at our pages folder which contains some javascript files and one API folder Before we dive any further lets actually create a landing page for our site so before we even begin first you need to install framer motion library Let s dive in and create a beautiful looking UI for our E commerce application before we start on the backend integration part Let s start by making a landing page for the app and then move on to making a product page for it So inside the components folder create a Layout component and add the following code to it This component is simply a basic layout for our application that includes a navigation bar amp menus as well as the functionality to display our application s registration login modal components Layout jsimport Fragment useState from react import useRouter from next router import Head from next head import Link from next link import Image from next image import PropTypes from prop types import AuthModal from AuthModal import Menu Transition from headlessui react import HeartIcon HomeIcon LogoutIcon PlusIcon UserIcon ShoppingCartIcon from heroicons react outline import ChevronDownIcon from heroicons react solid const menuItems label List a new home icon PlusIcon href list label My homes icon HomeIcon href homes label Favorites icon HeartIcon href favorites label Logout icon LogoutIcon onClick gt null const Layout children null gt const router useRouter const showModal setShowModal useState false const user null const isLoadingUser false const openModal gt setShowModal true const closeModal gt setShowModal false return lt gt lt Head gt lt title gt SupaaShop A new way to shop lt title gt lt meta name title content SupaaShopp gt lt link rel icon href favicon ico gt lt Head gt lt div className min h screen flex flex col font Poppins bg linear gradient deg px transparent center linear gradient px transparent center acc gt lt header className h w full shadow lg gt lt div className h full container mx auto gt lt div className h full px flex justify between items center space x gt lt Link href gt lt a className flex items center space x gt lt img className shrink w h text primary src alt Logo gt lt span className text xl font semibold tracking wide text white gt lt span className text xl text success gt S lt span gt upabase lt span className text xl text success gt E lt span gt commerce lt span gt lt a gt lt Link gt lt div className flex items center space x gt lt Link href create gt lt a className ml px py rounded md bg info text primary hover bg primary hover text info focus outline none focus ring focus ring primaryfocus ring opacity font semibold transition gt Register shop lt a gt lt Link gt isLoadingUser lt div className h w px bg gray animate pulse rounded md gt user lt Menu as div className relative z gt lt Menu Button className flex items center space x px group gt lt div className shrink flex items center justify center rounded full overflow hidden relative bg gray w h gt user image lt Image src user image alt user name Avatar layout fill gt lt UserIcon className text gray w h gt lt div gt lt ChevronDownIcon className w h shrink text gray group hover text current gt lt Menu Button gt lt Transition as Fragment enter transition ease out duration enterFrom opacity scale enterTo opacity scale leave transition ease in duration leaveFrom opacity scale leaveTo opacity scale gt lt Menu Items className absolute right w overflow hidden mt divide y divide gray origin top right bg white rounded md shadow lg ring ring black ring opacity focus outline none gt lt div className flex items center space x py px mb gt lt div className shrink flex items center justify center rounded full overflow hidden relative bg gray w h gt user image lt Image src user image alt user name Avatar layout fill gt lt UserIcon className text gray w h gt lt div gt lt div className flex flex col truncate gt lt span gt user name lt span gt lt span className text sm text gray gt user email lt span gt lt div gt lt div gt lt div className py gt menuItems map label href onClick icon Icon gt lt div key label className px last border t last pt last mt gt lt Menu Item gt href lt Link href href gt lt a className flex items center space x py px rounded md hover bg gray gt lt Icon className w h shrink text gray gt lt span gt label lt span gt lt a gt lt Link gt lt button className w full flex items center space x py px rounded md hover bg gray onClick onClick gt lt Icon className w h shrink text gray gt lt span gt label lt span gt lt button gt lt Menu Item gt lt div gt lt div gt lt Menu Items gt lt Transition gt lt Menu gt lt button type button onClick openModal className ml px py rounded md bg info hover bg primary focus outline none focus ring focus ring primary focus ring opacity text primary hover text info font extrabold transition gt Login lt button gt lt div gt lt div gt lt div gt lt header gt lt main className flex grow container mx auto gt lt div className px py gt typeof children function children openModal children lt div gt lt main gt lt AuthModal show showModal onClose closeModal gt lt div gt lt gt Layout propTypes children PropTypes oneOfType PropTypes node PropTypes func export default Layout Let s create a Hero section of our landing page after you ve successfully created a layout for the application To do so simply paste the following code into that section So in this section we ll add an image on the right a large text heading and two buttons on the left Note that we are styling our project with the absolute power of tailwind css and framer motion to add some beautiful transition animation to the image Since we ve already created buttons on our starter template you won t have to worry about creating them from scratch instead you can simply import them from the components and use them components Hero jsimport React from react import PrimaryButton from components PrimaryButton import SecondaryButton from components SecondaryButton import motion from framer motion const Hero gt return lt div className max w xl mx auto py flex flex col md flex row space y md space y gt lt div className w full md w flex flex col justify center items center gt lt div className max w xs lg max w md space y w mx auto md w full text center md text left gt lt h className font primary font extrabold text white text xl sm text xl md text xl md leading tight gt Shop lt span className text success gt whenever lt span gt and lt span className text success gt however lt span gt you want from lt span className text success gt wherever lt span gt you are lt h gt lt p className font secondary text gray text base md text lg lg text xl gt SuperbaseEcommerce improves and streamlines your shopping experience lt p gt lt div className flex space x gt lt PrimaryButton text Register link gt lt SecondaryButton text Let s Shop link products gt lt div gt lt div gt lt div gt lt motion div className w full md w transform scale x lg scale x initial opacity translateY animate opacity translateY transition duration translateY gt lt img alt hero img src assets shop svg className mx auto object cover shadow rounded tr extraLarge rounded bl extraLarge w full h sm h md h gt lt motion div gt lt div gt export default Hero Now before re running the server import this Hero component into the index js file and wrap it in the Layout component to see the changes you ve made index jsimport Layout from components Layout import Hero from components Hero export default function Home return lt Layout gt lt Hero gt lt Layout gt This is how your landing page should appear After you ve finished with the Hero section go ahead and create a ShopCards component where we ll simply list the demo features that this application offers and add some images so your final code for the ShopCards component should look like this components ShopCards jsimport React useState useEffect useRef from react import motion from framer motion const ShopCards gt const tab setTab useState const tabs useRef null const heightFix gt if tabs current children tab tabs current style height tabs current children tab offsetHeight px useEffect gt heightFix tab return lt section className relative gt lt div className absolute inset pointer events none pb aria hidden true gt lt div gt lt div className relative max w xl mx auto px sm px gt lt div className pt md pt gt lt div className max w xl mx auto text center pb md pb gt lt h className text xl mb gt Features lt h gt lt p className text xl text gray gt List of features that SuperbaseEcommerce provides lt p gt lt div gt lt div className relative max w xl mx auto px sm px gt lt div className pt md pt gt lt div className max w xl mx auto text center pb md pb gt lt div className data aos zoom y out ref tabs gt lt motion div className relative w full h full initial opacity translateY animate opacity translateY transition duration translateY gt lt img alt hero img src assets webShop svg className mx auto object cover shadow rounded tr extraLarge rounded bl extraLarge w full h sm h md h gt lt motion div gt lt div gt lt div gt lt div gt lt div gt lt div className max w xl mx auto py flex flex col md flex row space y md space y gt lt div className max w xl md max w none md w full mx auto md col span lg col span md mt pr data aos fade right gt lt div className md pr lg pr xl pr mb gt lt h className h mb gt All of our awesome features lt h gt lt p className text xl text black gt lt p gt lt div gt lt div className mb md mb gt lt a className flex items center text lg p rounded border transition duration ease in out mb tab bg white shadow md border success hover shadow lg bg success border transparent href onClick e gt e preventDefault setTab gt lt div gt lt div className font bold leading snug tracking tight mb text gray gt Register Login Feature lt div gt lt div className text gray gt User can login and save their products for later purchase lt div gt lt div gt lt a gt lt a className flex items center text lg p rounded border transition duration ease in out mb tab bg white shadow md border purple hover shadow lg bg success border transparent href onClick e gt e preventDefault setTab gt lt div gt lt div className font bold leading snug tracking tight mb text gray gt Add to cart lt div gt lt div className text gray gt User can add the products items to their cart lt div gt lt div gt lt a gt lt a className flex items center text lg p rounded border transition duration ease in out mb tab bg white shadow md border purple hover shadow lg bg success border transparent href onClick e gt e preventDefault setTab gt lt div gt lt div className font bold leading snug tracking tight mb text gray gt Security lt div gt lt div className text gray gt Hassle free secure login and registration process lt div gt lt div gt lt a gt lt a className flex items center text lg p rounded border transition duration ease in out mb tab bg white shadow md border purple hover shadow lg bg success border transparent href onClick e gt e preventDefault setTab gt lt div gt lt div className font bold leading snug tracking tight mb text gray gt Personalized shops lt div gt lt div className text gray gt User can create register their very own shop and add their own products lt div gt lt div gt lt a gt lt div gt lt div gt lt div gt lt div gt lt div gt lt section gt export default ShopCards Again before re running the server import this ShopCards component into the index js file and wrap it in the Layout component amp below the Hero component to see the changes you ve made index jsimport Layout from components Layout import Hero from components Hero import ShopCards from components ShopCards export default function Home return lt Layout gt lt Hero gt lt ShopCards gt lt Layout gt For the time being this is how your landing page should appear Finally let s add a Footer section so make a Footer component and paste the code below into it components Footer jsimport Link from next link const Footer gt return lt footer gt lt div className max w xl mx auto px sm px pt gt lt div className sm col span md col span lg col span gt lt section gt lt div className max w xl mx auto px sm px gt lt div className pb md pb gt lt div className relative bg success rounded py px md py md px shadow xl overflow hidden data aos zoom y out gt lt div className absolute right bottom pointer events none hidden lg block aria hidden true gt lt div gt lt div className relative flex flex col lg flex row justify between items center gt lt div className text center lg text left lg max w xl gt lt h className text gray text xl font medium mb gt Sign up for the early access lt h gt lt p className text gray text lg mb gt SuperbaseEcommerce improves and streamlines your shopping experience lt p gt lt form className w full lg w auto gt lt div className flex flex col sm flex row justify center max w xs mx auto sm max w xl lg mx gt lt input type email className w full appearance none bg purple border border gray focus border gray rounded sm px py mb sm mb sm mr text black placeholder gray placeholder Enter your email… aria label Enter your email… gt lt a className btn text white bg info hover bg success shadow href gt Sign Up lt a gt lt div gt lt form gt lt div gt lt div gt lt div gt lt div gt lt div gt lt section gt lt div gt lt div className md flex md items center md justify between py md py border t border solid gt lt ul className flex mb md order md ml md mb gt lt li gt lt Link href className flex justify center items center text blue hover text gray bg blue hover bg white rounded full shadow transition duration ease in out aria label Twitter gt lt svg className w h fill current viewBox xmlns gt lt path d M c Hc v c z gt lt svg gt lt Link gt lt li gt lt li className ml gt lt Link href className flex justify center items center text white hover text gray bg black hover bg white rounded full shadow transition duration ease in out aria label Github gt lt svg className w h fill current viewBox xmlns gt lt path d M c Vc s c vc z gt lt svg gt lt Link gt lt li gt lt ul gt lt div className flex shrink mr gt lt Link href className block aria label SuperbaseEcommerce gt lt img className object cover h w full src alt SupabaseEcommerce gt lt Link gt lt div gt lt div gt lt div gt lt footer gt export default Footer Note Again before re running the server import this Footer component into the index js file and wrap it in the Layout component amp below the ShopCards component to see the changes you ve made index jsimport Layout from components Layout import Hero from components Hero import ShopCards from components ShopCards import Footer from components Footer export default function Home return lt Layout gt lt Hero gt lt ShopCards gt lt Footer gt lt Layout gt So if you re run the server this is what your application should look like The structure of your component folders should resemble something like this Congratulationss Now that you ve successfully created a landing page for the application let s move on to the core of the matter creating the product section of the application So Now let s look at the  app js file app jsimport styles globals css import Toaster from react hot toast function MyApp Component pageProps return lt gt lt Component pageProps gt lt Toaster gt lt gt export default MyApp The App component is used by Next js to create pages You can control the page initialization by simply overriding it It allows you to do amazing things like Persisting layout across page changes Keeping state while navigating pages Custom error handling using componentDidCatch Inject additional data into pages and Add global styles CSS are just a few of the great things you can accomplish with it In the above app js code the Component parameter represents the active page when you switch routes Component will change to the new page As a result the page will receive any props you pass to Component Meanwhile pageProps is an empty object that contains the initial props that were preloaded for your page by one of the data fetching methods Now inside the pages folder create a new page called products js and import the Layout and Grid components then import the data json file as products and make the following changes to it pages products jsimport Layout from components Layout import Grid from components Grid import products from data json export default function Products return lt Layout gt lt div className mt p gt lt Grid products products gt lt div gt lt Layout gt Database ConfigurationsBefore jumping directly on our application we ll be utilizing the power of Supabase to create a PostgreSQL database the Prisma schema to define the app data model and Next js to connect those two together So let s get started building our database Supabase ConfigurartionCreating a PostgreSQL database in Supabase is as simple as starting a new project Head over to supabase com and Sign in to your account After you ve successfully signed in you should see something similar to this Now select New project button Fill in your project s required details and again click Create Project button and wait for the new database to load After the supabase configured the project your dashboard should look something similar to this Creating a connection URLFollow the steps outlined below to retrieve your database connection URL after your database has been successfully created We ll need it to use Prisma in our Next js app to query and create data Step Head over to the Settings tab Located at the left side Step Click the Database tab in the sidebar Located on the left side Step Head over to the bottom of the page to find the Connection string section then select Nodejs and copy the URL Initializing PrismaPrisma is a next generation ORM that can be used in Node js and TypeScript applications to access a database W eare going to use prisma fo our application because it includes all of the code we need to run our queries It will save us a lot of time and keep us from having to write a bunch of boilerplate codes Installing prisma Prisma CLI installationThe Prisma command line interface CLI is the primary command line interface for interacting with your Prisma project It can create new project assets generate Prisma Client and analyze existing database structures via introspection to create your application models automatically npm i prisma Initialize prismaOnce you ve installed the Prisma CLI run the following command to get Prisma started in your Next js application It will then create a prisma directory and the schema prisma file within it inside your particular project folder so inside it we will be adding all the configuration for our application npx prisma init prisma schemagenerator client provider prisma client js datasource db provider postgresql url env DATABASE URL Note schema prisma uses Prisma Schema Language PSL Prisma client js the Prisma JavaScript client is the configured client represented by the generator block generator client provider prisma client js Next one is the the provider property of this block represents the type of database we want to use and the connection url represents how Prisma connects to it datasource db provider postgresql url env DATABASE URL Environment variableUsing environment variables in the schema allows you to keep secrets out of the schema file which in turn improves the portability of the schema by allowing you to use it in different environments Environment variables is created automatically after we fire the npx prisma init command Note Prisma supports the native connection string format for PostgreSQL MySQL SQLite SQL Server MongoDB Preview and CockroachDB Preview DATABASE URL postgresql test test localhost test schema foo As you can see there is an DATABASE URL variable with a dummy connection URL in this environment variable env So replace this value with the connection string you obtained from Supabase DATABASE URL postgresql postgres YOUR PASSWORD db bboujxbwamqvgypibdkh supabase co postgres Prisma schemas and modelsWe can begin working on our application s data models now that database is finally connected to your Next js In Prisma our application models should be defined within the Prisma schema using the Prisma models These models represent the entities of our application and are defined by the model blocks in the schema prisma file Each block contains several fields that represent the data for each entity So let s begin by creating the Product model which will define the data schema for our products properties Defining modelsModels represent the entities of your application domain Models are represented by model blocks and define a number of fields In this data model Product is the model prisma schemagenerator client provider prisma client js datasource db provider postgresql url env DATABASE URL model Product id String id default cuid image String title String description String status String price Float authenticity Int returnPolicy Int warranty Int createdAt DateTime default now updatedAt DateTime updatedAt Each field as shown in our Product model has at least a name and its type To learn more about the Scalar types and Prisma schema refrences visit the following links Data modelPrisma schemaPrisma schema reference Generate Prisma ClientAfter designning Prisma model we can begin generating our Prisma Client We ll need to use Prisma s JavaScript library later in the article to interact with our data from within our Next js app without having to write all of the SQL queries ourselves But there s more to it Prisma Client is in fact an auto generated type safe API designed specifically for our application which will gives us the JavaScript code we need to run queries on our data Step Installing prisma client npm install prisma clientstep Generating Prisma client npx prisma generate The prisma client npm packageThe prisma client npm package consists of two key parts The prisma client module itself which only changes when you re install the packageThe prisma client folder which is the default location for the unique Prisma Client generated from your schema prisma client index d ts exports prisma clientFinally after you have done that inside your node modules folder you should now find the generated Prisma Client code Note You need to re run the prisma generate command after every change that s made to your Prisma schema to update the generated Prisma Client code Here is a graphical illustration of the typical workflow for the Prisma Client generation Note also that prisma generate is automatically invoked when you re installing the prisma client npm package The Prisma Client is generated from the Prisma schema and is unique to your project Each time you change the schema and run prisma generate the client code changes itself Pruning in Node js package managers has no effect on the prisma folder Creating a table in SupabaseIf you look at your database in Supabase you ll notice there is no table inside it It s because we haven t yet created the Product table The Prisma model we defined in our schema prisma file has not yet been reflected in our database As a result we must manually push changes to our data model to our database Pushing the data modelPrisma makes it really very easy to synchonize the schema with our database So to do that follow the command listed below npx prisma db pushThis command is only good for prototyping on the schemas locally OR npx prisma migrate devThis method npx prisma migrate dev will be used in this article because it is very useful in that it allows us to directly sync our Prisma schema with our database while also allowing us to easily track the changes that we make So to begin using Prisma Migrate enter the following command into the command prompt and after that enter a name for this first migration when prompted After you have completed this process successfully prisma will automatically generate SQL database migration files and you should be able to see the SQL which should look something like this if you look inside the prisma folder CreateTableCREATE TABLE Product id TEXT NOT NULL image TEXT title TEXT NOT NULL description TEXT NOT NULL status TEXT NOT NULL price DOUBLE PRECISION NOT NULL authenticity INTEGER returnPolicy INTEGER warranty INTEGER createdAt TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP updatedAt TIMESTAMP NOT NULL CONSTRAINT Product pkey PRIMARY KEY id Finally check the Supabase dashboard to see if everything has been successfully synced Prisma StudioPrisma Studio is a visual interface to the data residing inside your database where you can use to quickly visualize and manipulate the data The cool thing about it is that it runs in entirely on your browser and you don t need to set up any connections because it s already comes with the prisma package Not only that from the studio you can quickly open all of your application s models and interact with them directly via studio itself Note There is also desktop application available to download Launching Prisma StudioLaunching the prisma studio is really very easy Literally all you have to do is run the following command from a Prisma project npx prisma studioNow open your browser and head over to http localhost You should be able to see the single table that we ve created previously if you ve followed all of the steps correctly Manually adding the recordsLets manually add some records and save the changes that we made Finally lets create a functionality to access that data from within our Next js app where we can create new records update existing ones and delete old ones Interacting with data using Next jsYou should see some demo datas if you look at the Product page of your application Now open the file pages products js file which represents our app s product page pages products jsimport Layout from components Layout import Grid from components Grid import products from products json export default function Products return lt Layout gt lt div className mt p gt lt Grid products products gt lt div gt lt Layout gt As you can see products data is comming from products json file products json id image products ballpen png title Ball Pen description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status new warranty price id image products actioncamera png title Go pro cam description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status new warranty price id image products alarmclock png title Alarm Clock description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status new warranty price id image products bangle png title Bangle description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status new warranty price id image products bed png title Large Bed description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status out of stock warranty price id image products binderclip png title Binder clip description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status new warranty price id image products beyblade png title BeyBlade Burst description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status out of stock warranty price id image products boxinggloves png title Boxing gloves description Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum authenticity returnPolicy status new warranty price This data amp information is then passed as a prop from the Product component to the Grid component The Grid component is then in charge of rendering those data as a grid of Card on the screen Products jsimport PropTypes from prop types import Card from components Card import ExclamationIcon from heroicons react outline const Grid products gt const isEmpty products length return isEmpty lt p className text purple bg amber px rounded md py max w max inline flex items center space x gt lt ExclamationIcon className shrink w h mt px gt lt span gt No data to be displayed lt span gt lt p gt lt div className grid md grid cols lg grid cols xl grid cols gap gt products map product gt lt Card key product id product onClickFavorite toggleFavorite gt lt div gt Grid propTypes products PropTypes array export default Grid Now we want to retrieve data from our database and we ll do so using Server Side Rendering SSR The ability of an application to convert HTML files on the server into a fully rendered HTML page for the client is known as server side rendering SSR The web browser sends a request for information to the server which responds immediately by sending the client a fully rendered page So in order to use Server Side Rendering SSR with Next js we must export an asynchronous function getServerSideProps from within the file which exports the page where we want to render out our data The data returned by the getServerSideProps function will then be used by Next js to pre render our page on each individual request Let s get started and export this function from our applicartion s Prodcuts page pages products jsimport Layout from components Layout import Grid from components Grid import products from products json export async function getServerSideProps return props props for the Home component export default function Products return lt Layout gt lt div className mt p gt lt Grid products products gt lt div gt lt Layout gt To get the data from supabase import and instantiate the generated Prisma client pages products jsimport Layout from components Layout import Grid from components Grid import PrismaClient from prisma client import products from products json const prisma new PrismaClient export async function getServerSideProps return props props for the Home component export default function Products return lt Layout gt lt div className mt p gt lt Grid products products gt lt div gt lt Layout gt Now Using the findMany query we can get all of the records in our Product table pages products jsimport Layout from components Layout import Grid from components Grid import PrismaClient from prisma client const prisma new PrismaClient export async function getServerSideProps const products await prisma product findMany return props products JSON parse JSON stringify products export default function Products products return lt Layout gt lt div className mt p gt lt Grid products products gt lt div gt lt Layout gt Simply re run the application but if you get an error that looks like the one below you ll need to regenerate the prisma and then re run the server As you can see its fixed nowFinally your application should resemble something like this Lets give users the functionality to actually create records from the application itself So first step is to actually create Create a new recordsHead over to the pages folder and make a new file called addProduct js addProducts jsimport Layout from components Layout import ProductList from components ProductList const addProducts gt const createProduct gt null return lt Layout gt lt div className max w screen xl mx auto flex col gt lt h className text xl font medium text gray justify center gt Add your Products lt h gt lt div className mt gt lt ProductList buttonText Add Product redirectPath products onSubmit createProduct gt lt div gt lt div gt lt Layout gt export default addProducts After that head over to the ProductList component and make the following changes to that component components ProductList jsimport useState from react import useRouter from next router import PropTypes from prop types import as Yup from yup import toast from react hot toast import Formik Form from formik import Input from components Input import AddProductImage from components AddProductImage const ProductSchema Yup object shape title Yup string trim required description Yup string trim required status Yup string trim required price Yup number positive integer min required authenticity Yup number positive integer min required returnPolicy Yup number positive integer min required warranty Yup number positive integer min required const ProductList initialValues null redirectPath buttonText Submit onSubmit gt null gt const router useRouter const disabled setDisabled useState false const imageUrl setImageUrl useState initialValues image const upload async image gt TODO Upload image to remote storage const handleOnSubmit async values null gt let toastId try setDisabled true toastId toast loading Submitting Submit data if typeof onSubmit function await onSubmit values image imageUrl toast success Successfully submitted id toastId Redirect user if redirectPath router push redirectPath catch e toast error Unable to submit id toastId setDisabled false const image initialFormValues initialValues image title description status price authenticity returnPolicy warranty return lt div gt lt Formik initialValues initialFormValues validationSchema ProductSchema validateOnBlur false onSubmit handleOnSubmit gt isSubmitting isValid gt lt Form className space y gt lt div className space y gt lt Input name title type text label Title placeholder Entire your product name disabled disabled gt lt Input name description type textarea label Description placeholder Enter your product description disabled disabled rows gt lt Input name status type text label Status new out of stock used placeholder Enter your product status disabled disabled gt lt Input name price type number min label Price of the product placeholder disabled disabled gt lt div className justify center gt lt Input name authenticity type number min label authenticity placeholder disabled disabled gt lt Input name returnPolicy type number min label returnPolicy years placeholder disabled disabled gt lt Input name warranty type number min label warranty years placeholder disabled disabled gt lt div gt lt div gt lt div className flex justify center gt lt button type submit disabled disabled isValid className bg success text white py px rounded md focus outline none focus ring focus ring teal focus ring opacity hover bg teal transition disabled opacity disabled cursor not allowed disabled hover bg teal gt isSubmitting Submitting buttonText lt button gt lt div gt lt Form gt lt Formik gt lt div className mb max w full gt lt AddProductImage initialImage src image alt initialFormValues title onChangePicture upload gt lt div gt lt div gt ProductList propTypes initialValues PropTypes shape image PropTypes string title PropTypes string description PropTypes string status PropTypes string price PropTypes number authenticity PropTypes number returnPolicy PropTypes number warranty PropTypes number redirectPath PropTypes string buttonText PropTypes string onSubmit PropTypes func export default ProductList After that go to the AddProductImage file inside the component folder and copy the following code AddProductImage jsimport useState useRef from react import PropTypes from prop types import Image from next image import toast from react hot toast import classNames from classnames import CloudUploadIcon from heroicons react outline const AddProductImage label Image initialImage null objectFit cover accept png jpg jpeg gif jiff sizeLimit onChangePicture gt null gt const pictureRef useRef const image setImage useState initialImage null const updatingPicture setUpdatingPicture useState false const pictureError setPictureError useState null const handleOnChangePicture e gt const file e target files const reader new FileReader const fileName file name split New file reader addEventListener load async function try setImage src reader result alt fileName if typeof onChangePicture function await onChangePicture reader result catch err toast error Unable to update image finally setUpdatingPicture false false if file if file size lt sizeLimit setUpdatingPicture true setPictureError reader readAsDataURL file else setPictureError File size is exceeding MB const handleOnClickPicture gt if pictureRef current pictureRef current click return lt div className flex flex col space y gt lt label className text gray gt label lt label gt lt button disabled updatingPicture onClick handleOnClickPicture className classNames relative aspect video overflow hidden rounded md disabled opacity disabled cursor not allowed transition group focus outline none image src hover opacity disabled hover opacity border border dotted hover border gray focus border gray disabled hover border gray gt image src lt Image src image src alt image alt layout fill objectFit objectFit gt null lt div className flex items center justify center gt image src lt div className flex flex col items center space y gt lt div className shrink rounded full p bg gray group hover scale group focus scale transition gt lt CloudUploadIcon className w h text gray transition gt lt div gt lt span className text xs font semibold text gray transition gt updatingPicture Image Uploading Upload product Image lt span gt lt div gt null lt input ref pictureRef type file accept accept onChange handleOnChangePicture className hidden gt lt div gt lt button gt pictureError lt span className text red text sm gt pictureError lt span gt null lt div gt AddProductImage propTypes label PropTypes string initialImage PropTypes shape src PropTypes string alt PropTypes string objectFit PropTypes string accept PropTypes string sizeLimit PropTypes number onChangePicture PropTypes func export default AddProductImage This addProduct component renders the entire page s layout which consist of a form from where you can add the product details and informations API endpointLet s actually create a API endpoint that will actually create a new record on our database via addProduct function const createProduct gt null But first within our Next js application project let s create an API endpoint to handle our POST request for creating new records Next js provides a file based API routing so any file in the pages api folder is mapped to api and treated as an API endpoint rather than a page They re only server side bundles so they won t add to the size of your client side bundle So create a file name called products js inside the pages api folder and inside it create a request handler fucntion like shown below export default async function handler req res Handling POST request for productsBefore we go any further use req method to check the HTTP method of the request inside that request handler function After that return a status code to the client becasue we are not handlling any kind of HTTP method pages api products jsexport default async function handler req res if req method POST TODO else res setHeader Allow POST res status json message HTTP method req method is not supported Adding new records with Prisma ClientNow lets use Prisma Client to create a new Product record in the database using the data from the current HTTP request pages api products jsexport default async function handler req res if req method POST const image title description status price authenticity returnPolicy warranty req body else res setHeader Allow POST res status json message HTTP method req method is not supported After that lets actually initialize Prisma and call the create function that prisma provides import PrismaClient from prisma client const prisma new PrismaClient export default async function handler req res if req method POST const image title description status price authenticity returnPolicy warranty req body const home await prisma product create data image title description status price authenticity returnPolicy warranty else res setHeader Allow POST res status json message HTTP method req method is not supported Finally lets add some try catch block to Handle the error pages api products jsimport PrismaClient from prisma client const prisma new PrismaClient export default async function handler req res if req method POST try const image title description status price authenticity returnPolicy warranty req body const product await prisma product create data image title description status price authenticity returnPolicy warranty res status json product catch e res status json message Something went wrong else res setHeader Allow POST res status json message HTTP method req method is not supported Now that we ve created our API let s call the API endpoint To do so open the addProduct js file in the pages folder and make the following changes to the code but first we ll need to install the axios package so do that first npm i axiosORyarn add axios pages addProducts jsimport Layout from components Layout import ProductList from components ProductList const addProducts gt const createProduct gt data gt axios post api products data return lt Layout gt lt div className max w screen xl mx auto flex col gt lt h className text xl font medium text gray justify center gt Add your Products lt h gt lt div className mt gt lt ProductList buttonText Add Product redirectPath products onSubmit createProduct gt lt div gt lt div gt lt Layout gt export default addProducts Now lets re run the server again After that head over to your browser and go to the http localhost addProducts route and fill out all the product information and Submit it It will automatically redirect you to the products page and you should be able to see the product that you just added Pre rendering the pagesWe ve used the getServerSideProps function to pre render the product of our app using Server Side Rendering SSR Next js on the other hand comes with a built in pre rendering method called Static Generation SSG When a page uses Static Generation the HTML for that page is generated during the build process That means that when you run next build in production the page HTML is generated Each request will then be served with the same HTML A CDN can cache it You can statically generate pages with or without data using Next js We can use different pre rendering techniques on our applications when we use a framework like Next js For something more simple and non dynamic we can use static site generation SSG For dynamic content and more complex pages we can use server side rendering SSR Dynamic Routing with SSGWe can still statically generate pages with SSG after fetching some external data during the build process even if SSG generates HTML at build time learn more about static generation and dynamic routing Let s get data at build time by exporting an async function called getStaticProps from the pages we want to statically generate For Example posts will be populated at build time by getStaticProps function Blog posts return lt ul gt posts map post gt lt li gt post title lt li gt lt ul gt This function gets called at build time on server side It won t be called on client side so you can even do direct database queries export async function getStaticProps Call an external API endpoint to get posts You can use any data fetching library const res await fetch https posts const posts await res json By returning props posts the Blog component will receive posts as a prop at build time return props posts export default Blog Let s put Static Generation SSG to work in our application The pages that render each individual Product listing are the ones that we ll statically generate at the build time However because product listings are generated through the users we could end up with massive amount of pages As a result we won t be able to define those routes using predefined paths Otherwise we ll end up with a slew of useless files cluttering up our project We can easily create dynamic routes in Next js We just need to add brackets to a page s filename id js to create a dynamic route However in our project we will place that in the Products folder As a result any route s ids will be matched with their specific id value and the id value will be available inside the React component that renders the associated page Now go to the pages folder and make a new folder called products then make a new file called id js inside it And finally paste the following code inside that file pages products id jsximport Image from next image import Layout from components Layout const ListedProducts product null gt return lt Layout gt lt div className max w screen lg mx auto gt lt div className mt relative aspect video bg gray rounded lg shadow md overflow hidden gt product image lt Image src product image alt product title layout fill objectFit cover gt null lt div gt lt div className flex flex col sm flex row sm justify between sm space x space y pt gt lt div gt lt h className text xl font semibold truncate gt product title lt h gt lt ol className inline flex items center space x text info gt lt li gt lt span aria hidden true gt lt span gt lt span gt product status product lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product authenticity Authentic lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product returnPolicy year return policy lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product warranty year warranty lt span gt lt span aria hidden true gt lt span gt lt li gt lt ol gt lt p className mt text lg gt product description lt p gt lt div gt lt div gt lt div gt lt Layout gt export default ListedProducts Now let s actually provide the lists of paths of the pages that we want to statically generate and let s actually fetch some data and match it with the numbers of paths To do so we must provide the paths to Next js that we want to pre render at build time This function should return all the paths of the pages to pre render at build time along with the corresponding id value in the returned object s params property So for that we ll be using Prisma to retrieve the IDs for all of the products residing on our database pages products id jsximport Image from next image import Layout from components Layout import PrismaClient from prisma client Instantiate Prisma Clientconst prisma new PrismaClient const ListedProducts product null gt return lt Layout gt lt div className max w screen lg mx auto gt lt div className mt relative aspect video bg gray rounded lg shadow md overflow hidden gt product image lt Image src product image alt product title layout fill objectFit cover gt null lt div gt lt div className flex flex col sm flex row sm justify between sm space x space y pt gt lt div gt lt h className text xl font semibold truncate gt product title lt h gt lt ol className inline flex items center space x text info gt lt li gt lt span aria hidden true gt lt span gt lt span gt product status product lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product authenticity Authentic lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product returnPolicy year return policy lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product warranty year warranty lt span gt lt span aria hidden true gt lt span gt lt li gt lt ol gt lt p className mt text lg gt product description lt p gt lt div gt lt div gt lt div gt lt Layout gt export async function getStaticPaths const products await prisma product findMany select id true return paths products map product gt params id product id fallback false export default ListedProducts The getStaticProps function must now be implemented So let s get started As you can see the first thing we do is use the Prisma findUnique function with the id retrieved from the query params object to get the data of the requested route Then if the corresponding home is found in the database we return it to the ListedProducts React component as a prop If the requested products cannot be found we return an object to tell Next js to redirect the user to our app s products page pages products id jsximport Image from next image import Layout from components Layout import PrismaClient from prisma client Instantiate Prisma Clientconst prisma new PrismaClient const ListedProducts product null gt return lt Layout gt lt div className max w screen lg mx auto gt lt div className mt relative aspect video bg gray rounded lg shadow md overflow hidden gt product image lt Image src product image alt product title layout fill objectFit cover gt null lt div gt lt div className flex flex col sm flex row sm justify between sm space x space y pt gt lt div gt lt h className text xl font semibold truncate gt product title lt h gt lt ol className inline flex items center space x text info gt lt li gt lt span aria hidden true gt lt span gt lt span gt product status product lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product authenticity Authentic lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product returnPolicy year return policy lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product warranty year warranty lt span gt lt span aria hidden true gt lt span gt lt li gt lt ol gt lt p className mt text lg gt product description lt p gt lt div gt lt div gt lt div gt lt Layout gt export async function getStaticPaths const products await prisma product findMany select id true return paths products map product gt params id product id fallback false export async function getStaticProps params const product await prisma product findUnique where id params id if product return props JSON parse JSON stringify product return redirect destination products permanent false export default ListedProducts Now re run the server and head back to the browser and open the application Implementing Incremental Static Generation ISR If you try to access a page for a new product listing in production you ll get a error page instead To see this in action build your app and run it as you would in production because getStaticProps runs on every request in development So we have different behavior in development that differs from what we would see in production To serve a production build of your application simply fire up the following command but make sure to stop the server first yarn buildyarn startThe main reason for the page is that we used Static Generation to define the routes products id js and we only generated pages for the products that were in our database at the time In other words after this build process none of the products our users create will generate a new page That is why we have a page instead because the page simply does not exist at all To fix this we ll need to define a fallback that will allow us to continue building pages lazily at runtime pages products id jsimport Image from next image import Layout from components Layout import PrismaClient from prisma client Instantiate Prisma Clientconst prisma new PrismaClient const ListedProducts product null gt return lt Layout gt lt div className max w screen lg mx auto gt lt div className mt relative aspect video bg gray rounded lg shadow md overflow hidden gt product image lt Image src product image alt product title layout fill objectFit cover gt null lt div gt lt div className flex flex col sm flex row sm justify between sm space x space y pt gt lt div gt lt h className text xl font semibold truncate gt product title lt h gt lt ol className inline flex items center space x text info gt lt li gt lt span aria hidden true gt lt span gt lt span gt product status product lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product authenticity Authentic lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product returnPolicy year return policy lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product warranty year warranty lt span gt lt span aria hidden true gt lt span gt lt li gt lt ol gt lt p className mt text lg gt product description lt p gt lt div gt lt div gt lt div gt lt Layout gt export async function getStaticPaths const products await prisma product findMany select id true return paths products map product gt params id product id SET to TRUE fallback true export async function getStaticProps params const product await prisma product findUnique where id params id if product return props JSON parse JSON stringify product return redirect destination products permanent false export default ListedProducts Now that we ve set the fallback to true the page will no longer be displayed It s also possible to detect whether the fallback version of the page is being rendered with the Next js router and if so conditionally render something else such as a loading spinner while we wait for the props to get loaded const router useRouter if router isFallback return lt svg role status class mr w h text gray animate spin dark text gray fill success viewBox fill none xmlns gt lt path d M C C C C ZM C C C C Z fill currentColor gt lt path d M C C C C C C C C C C C C Z fill currentFill gt lt svg gt Finally your id js code should look something like this pages products id jsimport Image from next image import Layout from components Layout import PrismaClient from prisma client const prisma new PrismaClient const ListedProducts product null gt const router useRouter if router isFallback return lt svg role status class mr w h text gray animate spin dark text gray fill success viewBox fill none xmlns gt lt path d M C C C C ZM C C C C Z fill currentColor gt lt path d M C C C C C C C C C C C C Z fill currentFill gt lt svg gt return lt Layout gt lt div className max w screen lg mx auto gt lt div className mt relative aspect video bg gray rounded lg shadow md overflow hidden gt product image lt Image src product image alt product title layout fill objectFit cover gt null lt div gt lt div className flex flex col sm flex row sm justify between sm space x space y pt gt lt div gt lt h className text xl font semibold truncate gt product title lt h gt lt ol className inline flex items center space x text info gt lt li gt lt span aria hidden true gt lt span gt lt span gt product status product lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product authenticity Authentic lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product returnPolicy year return policy lt span gt lt span aria hidden true gt lt span gt lt span aria hidden true gt lt span gt lt li gt lt li gt lt span aria hidden true gt lt span gt lt span gt product warranty year warranty lt span gt lt span aria hidden true gt lt span gt lt li gt lt ol gt lt p className mt text lg gt product description lt p gt lt div gt lt div gt lt div gt lt Layout gt export async function getStaticPaths const products await prisma product findMany select id true return paths products map product gt params id product id fallback false export async function getStaticProps params const product await prisma product findUnique where id params id if product return props JSON parse JSON stringify product return redirect destination products permanent false export default ListedProducts Uploading image in SupabaseWe ve created product records up to this point but without any images because we haven t yet implemented aby media storage We ll use Supabase Storage a fantastic service from Supabase to store and use media files in our project Creating a bucket in supabaseBuckets are distinct containers for files and folders It is like a super folders Generally you would create distinct buckets for different Security and Access Rules For example you might keep all public files in a public bucket and other files that require logged in access in a restricted bucket To create a bucket in Supabase first navigate to the storage section of the dashboard After that select Create Bucket button Next give the bucket a name for now we ll call it supabase ecommerce and remember to make it public and click on that Create Button button Manually uploading image on databaseStep Head over to the supabase Storage and upload the products images Step Select the product image and copy the image urlStep Open up the Prisma Studio by typing npx prisma studio inside the command line terminal Step Now paste all of the image urls you copied in Step inside the image row Go back to the application and refresh the page now that you ve added all of the image urls You may encounter the error shown below Copy the hostname of your file URL and paste it into the images domains config in the next config js file to fix the error module exports reactStrictMode true images domains ezkjatblqzjynrebjkpq supabase co After that restart the server and you should see images Security RulesWe must define some security rules to be able to deal with our image files inside our bucket using the Supabase API So add the security rules from our Supabase dashboard Step Head over to the Storage section and go to the Policies section Step Create a New Policy Step Select Get started quickly Step Use Allow access to JPG images in a public folder to anonymous users this template Step Give the Policy Name select all the Operation and give bucket id and Hit Review Step Review the policy and save it Step Finally you ve successfully created a Storage Policy Upload a file from applicationLet s keep going and add the ability for our application to upload and store our products images Let s begin by adding a new API endpoint to your project s pages api productsImage js directory pages api productsImage jsexport default async function handler req res if req method POST else res setHeader Allow POST res status json message HTTP method req method not supported Now let s use Supabase JS Client for uploading the image to our Supabase Storage Bucket To do so you need to install supabase supabase js client library npm i supabase supabase jsThen inside your pages api productsImage js file import it and create a new Supabase Client pages api productsImage jsimport createClient from supabase supabase js const supabase createClient process env SUPABASE API URL process env SUPABASE API KEY export default async function handler req res if req method POST else res setHeader Allow POST res status json message HTTP method req method not supported After that go to the Supabase dashboard and click on Setting gt API and add all those API keys to your env file SUPABASE API KEY eyJhbGciOiJIUzINiIsInRcCIIkpXVCJ eyJpcMiOiJzdXBhYmFzZSIsInJlZiIImVaphdGJscXpqeWyZWJ SUPABASE API URL SUPABASE STORAGE BUCKET supabase ecommerce Now you need to add three packages to your application The first one is base arraybuffer which encodes and decodes base to and from ArrayBuffers and another package called nanoid which is a very tiny secure URL friendly unique string ID generator for JavaScript yarn add nanoid base arraybufferReturn to our API endpoint and upload a file to our bucket using the Supabase Client Obtain the image data from the request s body and verify that it is not empty then inspect the image data for Base encoding After that save the file to your Supbase storage bucket With the SUPABASE STORAGE BUCKET env you must provide the storage bucket name the file path and the decoded Base data as well as the contentType Once the image has been successfully uploaded we can generate its public URL and return it to the client who initiated the HTTP request and then do some Error handling So finally your API endpoint for productsImage should look like this pages api productsImage jsimport supabase from lib supabase import nanoid from nanoid import decode from base arraybuffer export default async function handler req res if req method POST let image req body if image return res status json message There is no image try const imageType image match data base const baseFileData image split base if imageType baseFileData return res status json message Image data not valid const fileName nanoid const ext imageType split const path fileName ext const data error uploadError await supabase storage from process env SUPABASE STORAGE BUCKET upload path decode baseFileData imageType upsert true if uploadError console log uploadError throw new Error Image upload Failed const url process env SUPABASE API URL replace co storage v object public data Key return res status json url catch e res status json message Something went horribly wrong else res setHeader Allow POST res status json message HTTP method req method is not supported export const config api bodyParser sizeLimit mb After you have added the API endpoint make the following chnages to the ProductList import useState from react import useRouter from next router import PropTypes from prop types import as Yup from yup import toast from react hot toast import Formik Form from formik import Input from components Input import AddProductImage from components AddProductImage import axios from axios const ProductSchema Yup object shape title Yup string trim required description Yup string trim required status Yup string trim required price Yup number positive integer min required authenticity Yup number positive integer min required returnPolicy Yup number positive integer min required warranty Yup number positive integer min required const ProductList initialValues null redirectPath buttonText Submit onSubmit gt null gt const router useRouter const disabled setDisabled useState false const imageUrl setImageUrl useState initialValues image const upload async image gt if image return let toastId try setDisabled true toastId toast loading Uploading const data await axios post api productsImage image setImageUrl data url toast success Successfully uploaded Image id toastId catch e toast error Unable to upload Image id toastId setImageUrl finally setDisabled false const handleOnSubmit async values null gt let toastId try setDisabled true toastId toast loading Submitting Submit data if typeof onSubmit function await onSubmit values image imageUrl toast success Successfully submitted id toastId Redirect user if redirectPath router push redirectPath catch e toast error Unable to submit id toastId setDisabled false const image initialFormValues initialValues image title description status price authenticity returnPolicy warranty return lt div gt lt Formik initialValues initialFormValues validationSchema ProductSchema validateOnBlur false onSubmit handleOnSubmit gt isSubmitting isValid gt lt Form className space y gt lt div className space y gt lt Input name title type text label Title placeholder Entire your product name disabled disabled gt lt Input name description type textarea label Description placeholder Enter your product description disabled disabled rows gt lt Input name status type text label Status new out of stock used placeholder Enter your product status disabled disabled gt lt Input name price type number min label Price of the product placeholder disabled disabled gt lt div className justify center gt lt Input name authenticity type number min label authenticity placeholder disabled disabled gt lt Input name returnPolicy type number min label returnPolicy years placeholder disabled disabled gt lt Input name warranty type number min label warranty years placeholder disabled disabled gt lt div gt lt div gt lt div className flex justify center gt lt button type submit disabled disabled isValid className bg success text white py px rounded md focus outline none focus ring focus ring teal focus ring opacity hover bg teal transition disabled opacity disabled cursor not allowed disabled hover bg teal gt isSubmitting Submitting buttonText lt button gt lt div gt lt Form gt lt Formik gt lt div className mb max w full gt lt AddProductImage initialImage src image alt initialFormValues title onChangePicture upload gt lt div gt lt div gt ProductList propTypes initialValues PropTypes shape image PropTypes string title PropTypes string description PropTypes string status PropTypes string price PropTypes number authenticity PropTypes number returnPolicy PropTypes number warranty PropTypes number redirectPath PropTypes string buttonText PropTypes string onSubmit PropTypes func export default ProductList Now lets actually test our final application Chatwoot Configuration Chatwoot configuration on HerokuLet s get started by creating a chatwoot instance on Heroku Step First Create a free Heroku account by going to and then going to the chatwoot GitHub repository and clicking the Deploy to Heroku button in the readme section Step Second After you click that button you ll be able to see the basic setup that chatwoot has already completed Give the App name and replace the FRONTEND URL with the App name you just gave then click Deploy App Step Third Depending on your PC network status and server location the program may take to minutes to install Step Fourth After the app has been deployed go to the settings panel in the dashboard Step Fifth The domain section can be found in the settings menu In a new window open that URL Finally you ve configured chatwoot in Heroku successfully Step Sixth Inside the Resources section make sure the web and worker resources are enabled Step Seventh You should be able to log onto your chatwoot account if everything went smoothly So your first account has been created successfully The main benefit of deploying chatwoot on Heroku is that you have full control over your entire application and your entire data Chatwoot cloud setupThere is another way to get started with chatwoot which is the cloud way so this is the most straightforward way to get started is to register directly on the chatwoots website Step First Fill out all of the required information to create an account Step Second You ll get an email asking you to confirm your account after you ve signed up Step Third Proceed to login after you ve confirmed your account by clicking the Confirm my account option Step Fourth You may now visit the Chatwoot dashboard and begin connecting it with plethora of platform websites Facebook Twitter etc Chatwoot Cloud ConfigurationStep First Let s set up an inbox The inbox channel acts as a communication hub where everything can be managed including live chat a Facebook page a Twitter profile email and WhatsApp Step Second Now configure a website and domain name as well as all of the heading and tagline information like shown belowStep Third Finally to control your mailbox add Agents Keep in mind that only the Agents who have been authorized will have full access to the inbox Step Fourth Blammmm The website channel has been created successfully The website channel must now be connected Simply copy and paste the entire javascript code provided by chatwoot Now head back to our react app and create a new component folder and inside that folder create a new file component called ChatwootWidget and inside it create a script which helps to loads the Chatwoot asynchronously Simply follow the exact same steps outlined in the following code below ChatwootWidget jsimport useEffect from react const ChatwootWidget gt useEffect gt Add Chatwoot Settings window chatwootSettings hideMessageBubble false position right locale en type expanded bubble function d t var BASE URL var g d createElement t s d getElementsByTagName t g src BASE URL packs js sdk js g defer true g async true s parentNode insertBefore g s g onload function window chatwootSDK run websiteToken add you secret token here baseUrl BASE URL document script return null export default ChatwootWidget The best part about chatwoot is that you can customize it to your liking For example you can modify the position of the floating bubble extend it change the language and hide the message bubble All it takes is the addition of the following line of code window chatwootSettings hideMessageBubble false position right locale en type expanded bubble Finally it s time to import the ChatwootWidget component into our app js file To do so simply navigate to the app js file and import the chatwoot widget then render that component Your final code of app js should look like this app js jsimport styles globals css import Toaster from react hot toast import ChatwootWidget from components ChatwootWidget function MyApp Component pageProps return lt gt lt Component pageProps gt lt Toaster gt lt ChatwootWidget gt lt gt export default MyApp Now that you ve completed the chatwoot integration your finished project should resemble something like this Deploying to netlifyFirst sign in to netlify or create an account if you don t already have one You can also log in using a variety of other platforms Import your project from github now Sign in and connect to your GitHub account Look for your project on Github Add all of the configuration and don t forget to include the environment variables Yayyy Its deployed on Netlify ConclusionCongratulations You ve successfully created a fullstack application with Next js Supabase Prisma and chatwoot This article may have been entertaining as well as instructive in terms of creating a fully fgledged working ecommerce site from absolute scratch Aviyel is a collaborative platform that assists open source project communities in monetizing and long term sustainability To know more visit Aviyel com and find great blogs and events just like this one Sign up now for early access and don t forget to follow us on our socials RefrencesManaging env files and setting variablesA first look at Prisma StudioPre rendering and Data FetchingData ModelGenerating the clientInstantiating the clientPrisma schemaPrisma schema reference 2022-04-29 08:23:54
海外TECH DEV Community How to start a career in blockchain https://dev.to/join_hyve/how-to-start-a-career-in-blockchain-4fk4 How to start a career in blockchainYou can find the article here Cryptocurrencies have been intensely growing worldwide for their advantages and a great offer on virtual money transactions Blockchain technology is one of the most in demand skillsets in the world today If you re looking to start a career as a freelancer blockchain is a great option So you want to start a career in blockchain The world of cryptocurrency and distributed ledger technology is growing by leaps and bounds and there s no doubt that it s a hot field to be in right now But where do you start What is Blockchain short introBlockchain is a powerful technology that s being used in the financial world and beyond A blockchain database contains blocks with information about all past transactions which are verified by network participants before they can be recorded on this public ledger for everyone else in honest consensus without employing centralized intermediaries like banks or other trusted third parties The ledger itself cannot be changed which ensures its credibility among other things this makes the blockchain resistant to tampering attempts by any party involved since they would have been alerted about their crime when filling out paperwork at some point during the transmission How to get a job in crypto The crypto community is vibrant and welcoming and there are plenty of ways to get involved Unlike other sectors the blockchain industry is still in its early stages and is constantly evolving This means that there are many new and exciting opportunities waiting to be explored The good news is that starting a career in blockchain doesn t require a traditional degree or extensive experience Many people in the blockchain industry started as freelancers working on projects and building their networks from the ground up Here are some tips on how to get started Get connected The best way to find new clients and opportunities is to network with other professionals in the blockchain industry Attend blockchain events and meet ups or join online forums and communities There are plenty of online forums and meetups where you can learn from experts and network with other people in the blockchain industry Another way to get connected is by joining online forums or social media groups related to blockchain This is a great way to stay up to date on the latest news and developments in the industry and it s also a great way to meet people who can help you get started Start developing skills Crypto is a rapidly growing industry and there is a demand for skilled professionals Start developing skills in blockchain technology coding cryptography and marketing There are many online courses available that can help you get started First and foremost you need to be familiar with blockchain technology itself This means understanding how it works what its benefits are and how it s being used in different industries You should also be familiar with popular cryptocurrencies such as Bitcoin and Ethereum Next you ll need to develop your coding skills Many blockchain projects are built on top of Ethereum so if you want to work on them you ll need to be comfortable coding in Solidity Once you have a basic understanding of blockchain technology you can start exploring the various applications of blockchain technology and learn about the different use cases Some examples of careers in blockchain include blockchain developers designers engineers legal consultants and project managers Start freelancing Freelancing is a great way to get started in the blockchain industry There are many opportunities for freelancers to work on projects related to cryptocurrency and distributed ledger technology You can work as a freelancer in a variety of industries including the crypto industry For example you can find freelance opportunities on decentralized freelancing platforms like HYVE or you can network with people in the industry and find work opportunities HYVE provides privacy fairness and transparency but it also reduces transaction fees Whether you re just starting your freelancing career or are a seasoned freelancer you can access higher paying jobs by choosing the right freelance platform Stay up to date with the latest news and trends The crypto industry is constantly evolving so it s important to stay up to date on the latest trends and technologies There are many sources of information online and it s important to read as many as you can to gain a better understanding of the technology Read articles attend workshops and watch webinars Social media is another great way to stay up to date with the latest blockchain news Several social media platforms focus exclusively on blockchain technology and these platforms are a great place to learn about new projects upcoming ICOs and other important news events For example Google Alerts is a great tool for staying up to date with the latest news in any industry You can set up alerts for specific keywords or phrases and Google will send you an email notification every time those keywords are mentioned online This is a great way to stay informed about the latest blockchain news without having to spend hours tracking downBuild your portfolio It s important to have a strong portfolio if you want to work as a freelancer in the crypto industry Start by building a website or blog where you can showcase your work You can also create an online portfolio to showcase your skills and experience You have to take a head on dive into the world of blockchain and start searching for jobs suiting your skillset Start by looking for jobs on job boards and networking with professionals in the industry There are also many freelance opportunities available so start pitching your services to potential clients One of the best ways to get experience and learn more about the industry is to work on crypto projects This can be anything from helping with development work to writing articles or creating marketing materials There are a lot of different ways you can contribute so find something that interests you and go for it The bottom line is that there are plenty of opportunities for talented professionals who want to start a career in the crypto industry Whatever your choice your dream job is out there If you have a passion for crypto or blockchain development nothing is stopping you from becoming a professional in the industry Want to learn more about HYVE Follow us on Twitter ️Join our Telegram Group Join our Announcement Channel Join our Discord Follow us on Instagram Like us on Facebook Visit our Website 2022-04-29 08:17:53
海外TECH Engadget Google now lets you request the removal of personal information from Search https://www.engadget.com/google-request-removal-personal-information-search-081017621.html?src=rss Google now lets you request the removal of personal information from SearchYou can now ask Google to remove your personal contact information such as your physical and email addresses as well as your phone number from Search The tech giant already takes request for the removal of identifiable info in cases of doxxing or if the details posted in public could be used for financial fraud It s now expanding that policy to cover the aforementioned details along with confidential log in credentials and images of ID documents that can be used for identity theft According to The Verge Google still has a process to deal with malicious doxxing wherein an employee will look at links to determine how they d cause harm Under this expanded policy though the company can grant requests if the content you want to be removed from search doesn t have any public interest value or isn t quot relevant to a news report quot nbsp As the publication notes it s also different from the system Google implemented in the EU to comply with the region s right to be forgotten law The rules under the law allow you to ask for content removal if it s irrelevant inaccurate or unflattering ーthis policy expansion only covers sensitive information A spokesperson told The Verge that Google will de index content whether it s behind a paywall or not so long as the request meets its requirements In the company s announcement post Google Global Policy Lead for Search Michelle Chang reminds people that the removal of content from Search doesn t mean it s gone from the internet Chang encourages contacting website hosts if you want your information scrubbed completely 2022-04-29 08:10:17
金融 ニュース - 保険市場TIMES ペット&ファミリー損保、「2022年猫の名前ランキング」発表! https://www.hokende.com/news/blog/entry/2022/04/29/180000 ペットファミリー損保、「年猫の名前ランキング」発表総合位に輝いたのはペットファミリー損害保険株式会社以下、ペットファミリー損保は年月日、「年猫の名前ランキング」を発表した。 2022-04-29 18:00:00
ニュース @日本経済新聞 電子版 物流・生産、米巨大ITの足かせに Amazonは営業赤字も https://t.co/I27AR8ooPH https://twitter.com/nikkei/statuses/1519954820287057920 amazon 2022-04-29 08:20:43
ニュース @日本経済新聞 電子版 東京都、新たに3893人感染 7日平均で前週の84.7% https://t.co/UY7VdIa3Na https://twitter.com/nikkei/statuses/1519954457684979713 東京都 2022-04-29 08:19:16
海外ニュース Japan Times latest articles Missing tour boat found on seabed off Hokkaido https://www.japantimes.co.jp/news/2022/04/29/national/missing-boat-discovery/ waves 2022-04-29 17:02:29
ニュース BBC News - Home Ukraine war: Two UK aid workers captured by Russia, says NGO https://www.bbc.co.uk/news/uk-61268817?at_medium=RSS&at_campaign=KARANGA organisation 2022-04-29 08:44:32
ニュース BBC News - Home Black children over-policed in schools, report says https://www.bbc.co.uk/news/education-61263246?at_medium=RSS&at_campaign=KARANGA children 2022-04-29 08:48:12
ニュース BBC News - Home Israel airport chaos as family brings unexploded shell https://www.bbc.co.uk/news/world-middle-east-61267265?at_medium=RSS&at_campaign=KARANGA international 2022-04-29 08:33:22
ニュース BBC News - Home NFL Draft 2022: Jacksonville Jaguars select defensive lineman Travon Walker with first pick https://www.bbc.co.uk/sport/american-football/61268290?at_medium=RSS&at_campaign=KARANGA NFL Draft Jacksonville Jaguars select defensive lineman Travon Walker with first pickThe Jacksonville Jaguars select defensive lineman Travon Walker with the first pick of the draft in Las Vegas 2022-04-29 08:48:09
北海道 北海道新聞 首相、インドネシアに到着 対ロシア、海洋の自由で協力 https://www.hokkaido-np.co.jp/article/675680/ 岸田文雄 2022-04-29 17:01:30
北海道 北海道新聞 女児の靴に似た靴の左足側を発見 山梨・道志村山中で https://www.hokkaido-np.co.jp/article/675787/ 山梨県警 2022-04-29 17:13:00
海外TECH reddit Is it a good idea to go to companies in person to seek employment? https://www.reddit.com/r/japanlife/comments/ueh7qa/is_it_a_good_idea_to_go_to_companies_in_person_to/ Is it a good idea to go to companies in person to seek employment I ve been living in Japan for over two years working as an English teacher and I m thinking about changing careers Is it a good idea to go to some companies in person and ask if they have any open positions submitted by u Ryan Fornelius to r japanlife link comments 2022-04-29 08:21:23

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)