Codementor Events

Build a GraphQL API-Powered Portfolio Website

Published Mar 20, 2017Last updated Mar 24, 2017
Build a GraphQL API-Powered Portfolio Website

In this blog I will show you how to pick up an existing codebase example to build your very own beautiful Portfolio Website, powered by the Cosmic JS GraphQL API. The portfolio app includes portfolio management, contact form (powered by MailGun) and a beautiful frontend by HTML5UP.net. Install, deploy and edit every part of this portfolio website from your Cosmic JS Bucket Dashboard.

Why is GraphQL Special? GraphQL gives you the power to be more efficient with your API calls by allowing clients to query only specific values, limiting the amount of data returned. Read more about the Cosmic JS GraphQL API.

0*J99GAlB_GJmHxRA4.png

0*9M6CsvpdEeSyhDTE.png

I’ll be using Cosmic JS for this example app. Cosmic JS is an API-first CMS that makes managing and building websites and applications faster and more intuitive. By decoupling content from code, Cosmic JS empowers developer flexibility while ensuring content editors can plan and deploy content as it best suits them. We’ll be using Cosmic JS to install our example app, deploy and make content updates moving forward from the cloud-based Content Management Platform.

If you haven’t already, get started by Signing Up for Cosmic JS. Helpful resources are provided below to streamline your development operations.

Portfolio Website App Page

Portfolio Website App Demo

Portfolio Website App Codebase on GitHub

1. Create a New Bucket

0*sVINlZhckhgVDa8w.png

Your bucket’s name is the name of your website, project, client or web application that you are building. I named mine “Cosmic JS GraphQL API” to remain concise for our example blog.

2. Install the Cosmic JS Portfolio Website

0*ZroKpvaHHcWgJY8z.png

Once you’ve signed up and named your bucket, you’ll be prompted to start from scratch or “see some apps”. For this blog I simply clicked the right button to “see some apps” so that I could begin the installation process for the Cosmic JS Portfolio Website.

App Installation Options
0*DMvvfAjL1QMRvk-x.png

Cosmic JS gives you the ability to filter between functions languages such as Web, iOS, Android, Blog, Contact Form and more.
0*RfURHaBWzEY3Zvvd.png

Simply click “Install” underneath the Portfolio Website icon to get started, or visit the Cosmic JS Apps Page.

3. Deploy to Web

0*eXl-fvsD8cJw9KuU.png

I clicked “Deploy to Web”. I can then edit Objects while my web application is deploying. You will receive an email confirming the deployment of your web application. If you encounter any issues during deployment, you may be routed to the Cosmic JS Troubleshooting Page.

Confirm Deploy Location and Branch
0*eUDekEuniqAjFLKc.png

Deploy Branch Confirmation Modal
0*fONZqZojCvvwK79x.png

I’m drawing from a repo, my branch is clarified and I have a deployed location that matches my slug / bucket name that I made in Step 1.

4. Edit Global Objects

0*OzsHY2RrCK4vaEal.png

Editing is a dream come true in the Cosmic JS Dashboard. To read more about Cosmic JS user roles and permissions, read Managing Users Who Manage Content.

It’s as easy as signing up, creating a new bucket, installing the web application(s), edit objects and deploy! I get my confirmation email to access my web application and also see my options for bucket upgrades like custom domains, one-click SSL, webhooks and localization. See all Cosmic JS Features.

Cosmic JS is an API-first cloud-based content management platform that makes it easy to manage applications and content. If you have questions about the Cosmic JS API, please reach out to the founders on Twitter or Slack.


This tutorial was originally posted by the author here.

Discover and read more posts from Carson Gibbons
get started
post commentsBe the first to share your opinion
Show more replies