One thing you’ve probably noticed if you operate an online business is that you are always busy. From creating social media posts to paying vendors, there will always be tasks screaming for your attention. You will often find yourself balancing many different roles like marketing, customer support, bookkeeping, social media management, and vendor relationship management, to name a few.
What if you could spend a fraction of the time you’re currently taking to do these tasks while achieving much more? With the right tools, you can streamline your daily operations, reduce waste, and improve your business’s profitability. This will make it much easier to grow your business and differentiate it from the competition.
1. CRM Software
Your customers are the most important part of your business. The more you understand them, the better you can serve them. Sadly, many small and medium-sized businesses store customer data on spreadsheets, from their contact details to their requests. While this strategy might work when starting an online business, it can be a lot more difficult to manage as your business grows.
First, customers want to feel appreciated, and offering customers services that are far from their expectations will only result in high churn rates. Second, the kind of data you collect from your customers will be invaluable in lead nurturing. It provides insights into the different behaviors of customers, which can help you cross-sell and up-sell products to them. Having your customers’ data in decentralized locations like on your employees’ laptops will do little to help achieve these goals.
This is where customer relationship management (CRM) systems come in. These solutions are created to centralize customer data. Most come with data analysis tools that can help you understand customers’ needs and use this information to personalize product and service delivery. Best of all, retrieving customer data becomes seamless with these tools, which can be essential whenever you are dealing with a time crunch.
How do you handle invoices, payments, and tax filings? Bookkeeping is a pet peeve for most business owners, but it is an essential part of your business’s success. Your accounting data can help you track cash flow, attract investors, save money, and improve profitability. The days of using large bookkeeping ledgers are over. Spreadsheet-based bookkeeping won’t cut it either if you are aiming for efficiency. They are both time-consuming and error-prone.
Modern online bookkeeping tools take all the hassle away from staying updated on your business numbers. They allow you to automatically record sales, track invoices, and file taxes. Most come with analysis and reporting features that make it easy to track your online business’s financial health.
3. Social Media Management Tools
Social media marketing is in vogue, and online businesses that know how to use it strategically are bound to excel. You can use social media to reach out to customers, increase brand awareness, run marketing campaigns, and even conduct brand surveys. Without a social media management tool by your side, social media can be a burden rather than a blessing. The typical business owner will need to run multiple campaigns across different social media platforms.
You need to understand the optimal time to post on different platforms, respond to customers on time, and keep an eye on your stats. Social media management tools will place all of your social data on one dashboard for easy access. You can track different campaigns on your platforms, automate posts, analyze stats, and identify opportunities with them.
4. Payment Processing Tools
Cash is no longer king – it has been usurped by more convenient payment methods like credit cards. With the vast majority of customers using alternative payment methods, you might lose a lot of business if you cannot support them. In fact, a lack of diverse payment options is among the top reasons for cart abandonment. The trick is to find payment processing solutions that your customers will appreciate.
Start with looking for a reliable credit card payment processor. If you are categorized as high-risk due to card not present transactions, chargebacks, or industry type, you should find a processor that specializes in these types of verticals. Next, ensure that you can provide your customers with echecks as a payment option. Increasing the payment methods you accept will increase your conversion. You want to be able to reassure your customers that you support popular online payment methods. It is an added benefit if your payment processor allows your customers to make payments in their local currency, especially if you are dealing with international customers.
5. Outsourcing Tools
As much as you might want to do everything in-house, it might be impossible to do so. Some tasks might be beyond your skill level. You might also lack the manpower to do other tasks. Take for example your cybersecurity needs. Some of the tasks to keep your customers’ information secure might be too technical for your in-house team. Hiring personnel to handle cybersecurity could end up costing you a lot, especially if your business is just starting out.
Outsourcing tools will connect you with businesses and freelancers that offer to help with these tasks. Besides offering their services at a lower price in comparison to hiring employees, these businesses tend to be quite skilled. Outsourcing tools will help get a variety of tasks done, including web design, cybersecurity, content management, compliance, and recruitment. In turn, you get to focus on the core areas of your business – the parts that matter most.
Your security tools have a huge impact on your business. Customers trust you with their data, from credit card numbers to their home addresses. If this information were to fall into the wrong hands, it could lead to huge problems. Threat actors can easily use this information for fraud and identity theft. In fact, businesses that have been hit by a cyber-attack often struggle to gain customer trust back, and to handle the financial implications of the attack.
If you don’t want to go to the expense of hiring another company to handle your cybersecurity, you should at least arm your business with certain tools to help you steer clear of these threats. While some cybersecurity tools will help you identify cyber threats, others will keep hackers and threat actors from accessing your sensitive data. Some of the most useful tools to invest in are firewalls, vulnerability monitoring tools, network monitoring tools, and anti-virus software. The right tool for your online business will depend on the specifics of the kind of data you handle.
Closing Thoughts
These tools are meant to make running your business easier. As long as you choose the right ones, you will make your business stand out from the competition. Assess your typical business needs and pick a tool that suits them.
The importance of brand consistency is indisputable. Or is it?
Marketers, like myself, like to think that it’s obvious for everybody outside of the marketing bubble that great branding is essential and it doesn’t stop at choosing a name, logo, and color scheme for your business (to be forgotten at some point).
But let’s dig into the meaning and importance of maintaining brand consistency and how to do it with ease.
What is brand consistency?
Brand consistency is when a business (or even an individual) communicates in a way that always aligns with the company’s overall branding strategy that highlights its mission, vision, and values.
You can think of consistent branding like driving on a clear highway: straight, easy to navigate, and allows for same-speed cruise control. It’s not boring, but it is consistent. Inconsistent branding can feel like roadwork: speeding limit changes, traffic jams, and roadblocks that divert you off the highway, and on occasion, gets you lost.
You might also hear marketers and branding experts refer to consistency and inconsistency as on-brand and off-brand.
Why is brand consistency important?
The importance of brand consistency is sometimes overlooked, especially in smaller businesses where there are not enough resources to concentrate on this area. However, not taking brand consistency seriously can mean missing out on potential business. Consistent branding can increase revenue by up to 23% – here’s how it can drive more business:
Builds brand recognition
Consistently seeing similar designs and reading similar messages can extend your brand’s ethos and help become memorable and recognizable. For example, if I say, Red Bull, you will immediately remember the look of the can, the line drawing commercials, and the “Red Bull gives you wings” slogan.
Helps you stand out of the crowd
Your branding should be specific to your business and so differentiate you from others. When somebody fancies an energy drink, they will likely choose a brand that they can recall rather than some random fizzy-sugary never-heard-of-drink.
Triggers positive emotions
Going back to the highway simile, a clear road calms the driver and makes the ride enjoyable, while a highway full of roadblocks and hard-to-navigate sections only creates frustration. When a brand communicates clearly and in an always-similar manner, that triggers positive emotions.
Builds trust, loyalty, and word of mouth
81% of customers say they need to trust a brand to buy from them. When you try a new brand and you like it, you’ll remember to return to it. If you’re exposed to the same messaging, same design, same values, delightful customer service over and over again, you will start to spend money with the brand as it’s always been a positive and easy experience to interact with them. Trust and loyalty then can turn into advocacy and build word of mouth marketing.
5 tips to maintain brand consistency throughout the customer journey
By now you are (hopefully) convinced that brand consistency should not be overlooked. Building your own brand from scratch can be challenging but maintaining brand consistency throughout the customer journey can be an even bumpier ride.
The key to consistent messaging is that everybody in the business knows about your branding guidelines, understands, and adheres to them. Sharing branding knowledge is much easier than you would think – and the following framework will give you a structure to start with.
1. Develop a brand book
Having a nicely designed, short, and easy-to-read brand book is the first step you need to take. You can refer to this book when onboarding new joiners or explaining the brand values to stakeholders in other departments that are not particularly close to marketing.
The brand book can take a more holistic approach to guidelines, so rather than listing color codes, font types, logo concepts, etc., it should focus on top-level business attributes. The brand book should cover your business’ mission and vision statement, it’s essence, personality, served audiences, and clearly outlines the brand positioning.
Having these in writing will make the whole brand image more official, professional, and easier to grasp. After all, you can’t expect your teams to adhere to a brand image that they don’t fully understand.
2. Create branding guidelines and policies
Unlike the more abstract brand book, your branding guidelines and policies should be as specific as it gets.
You could develop design guidelines that include your brand’s colors with samples, HEX, and RGB codes. Font types, weights, styles are also important – not only for designers but everybody who creates documents. Capturing the tone of voice (ToV) of your brand will also help you communicate persistently with customers via your website, social media, blog articles, sales enablement content, and even when providing customer service.
One approach you could take is to outline rules for each common type of content in your business. For example, you could have guidelines that are mostly applicable to visual content like banners, posters, infographics, sales decks, etc. Then you could write ToV documentation for marketing material like blog articles and social media posts or customer service guidelines for responses and support material. If you create video content, you can specify background music options, intros & outros, and video transition styles.
These policies will make adhering to guidelines much easier and you can always improve them over time based on the feedback of your team.
3. Design easy-to-use templates
Guidelines are good but templates are better. Design and marketing templates can help maintain brand consistency as they make it easy for anybody in the business to create materials that are always on-brand.
The templates must be accessible: If your designer creates some great social media templates in Photoshop but nobody else in the business knows how to use that software, it’s as useful as a concrete parachute.
If your marketers are familiar with Canva, create templates there. If your salespeople put together sales decks in Google Slides, that’s where you’ll need to work. If customer service runs on Intercom, that’s where your canned responses need to be. You get the idea.
4. Schedule alignment meetings
Talking things through can add an extra layer of confidence in being able to stay on-brand. Some teams, like sales and marketing, tend to work quite close together. Sales and marketing alignment meetings can be rolled out to other teams too.
Short but regular meetings can give you the space to talk about your brand as part of the agenda, answer questions, or point out slip-offs.
The importance of regular catch-ups is as important as ever: remote teams need to schedule such interactions, otherwise, important activities like ensuring brand consistency can slip through the cracks.
5. Add a review step in your workflow
Quality assurance is in general important, and adding a review step in your workflow can improve the quality of any activity or project. If you only take one thing away from this article, this should probably be it.
Reviewing material will instantly improve the quality of work at your business, however, without the right culture and preparation steps, task reviews can seem somewhat tedious. But when you have developed a culture of delivery and teams work together to deliver high-quality work, reviews can put the cherry on top.
If you implemented all the tips above, reviewing the work of other teams can add an extra layer of reassurance that the whole customer journey will be consistent. What’s more, you will be able to gauge how well others managed to utilize the brand book and your guidelines, make use of the premade templates, and take away information from the alignment meetings. This information will help you iterate on your processes and identify what’s next to improve.
The result
As a result of your hard work, your whole company will be much more likely to support maintaining brand consistency, which ultimately will lead to a smooth customer journey with familiar and positive experiences all the way through.
Do you find abandoned locations and buildings fascinating? Then urban exploration photography is for you! Exploring ruins and snapping their pictures is truly an adventure.
But what’s so exciting about it? Let’s find out more on urban exploration and photography!
A Look Into Urban Exploration And Urbex Photography
Urban exploration is where you explore abandoned structures and ruins. Most of these places are far-away from the city. Sometimes it also requires one to do trespassing of private properties.
There are various terms for it. Some of these terms are urbex, roof and tunnel hacking, urban caving, mousing, and building hacking.
Urbex photography is where you document your adventure by taking photos when exploring.
However, there are certain risks associated with this exploration. Abandoned places can pose physical dangers. Plus, there are also legal issues surrounding it. Trespassing is also a serious issue. And it is becoming increasingly common with urbex photography.
Before exploring, one needs to take the permission of the property owner or the authority. If anyone explores illegally, there’s a risk of a possible arrest.
However, some urban exploration activities violate local laws. One should make sure that it’s safe and legal to explore any specific location beforehand.
What Are Some Sites That One Can Explore?
There are various sites that one can explore forurban exploration photography. Most of these places tend to be far away from the city. Some of these places are as follows:
Abandoned amusement parks
Factories
Fall-out shelters
Asylums
Power plants
Catacombs
Sewer drains, etc.
Top Ten Tips For Urban Exploration Photography
Before you begin your trip, you need to plan it carefully to be safe. There are many risks associated with urban exploration photography. However, these following tips will help you to stay safe during your adventure.
1.Always Research The Location Properly
It’s easy to check out any location, thanks to the internet. But, you need to have an address for that! It can be tricky when obtaining the address and accessing the place. One of the best ways is to look into any urban exploration forum. And some of these forums are dedicated to urbex photography. These forums can help you find potential locations, helpful tips and advice. Or, you can also do a quick Google search. Search terms such as ‘Urban exploration [enter any location]’ or ‘Urbex locations’ or ‘Urbex near me’ are helpful to find suitable places.
2.Safety Should Be Your Main Priority
Yes, it’s fun, but there are safety concerns! Abandoned locations are not safe as they are left unattended. Always ask for a friend or two to join you on your trip. Also, make sure your family and friends know where you are heading out. In case any serious emergency occurs, people can help you out or know where to find you. Don’t forget to carry essential items such as a torch, masks, hard hats, rope, and a penknife. It’s best to pack a first-aid kit as well. Plus, don’t forget to wear some solid boots!
3.Check The Local Laws And Follow The Rules
Urban exploration photography can involve trespassing. Before selecting the location, make sure that you aren’t breaking any rules. You can spend some time online searching for local laws. Also, make sure that these are updated. Many abandoned places have got security guards outside. Therefore, never sneak into these places. Always ask for their consent before entering the building. Sometimes it’s not easy to gain permission. But, if you do, follow any of their instructions, word by word.
4.Keep Your Bag Light
Many people carry unnecessary things for urban exploration photography. Heavy bags make it tough to explore. Always pack light and only essentials, even if you are traveling to another city.
5.Pack Only Essential Photography Equipment
For clicking pictures inside buildings, a wide-angle lens is the best! The fewer lenses you carry, the lighter the bag will be. You can pack an extra lens as well if you accidentally break the main one. Also, don’t forget to carry a portable flash, a tripod, extra batteries, and lens wipes. A portable-flash will help you when you shoot in low-light areas.
6.Don’t Break or Shift Anything Inside The Building
Once you are inside the premise, don’t cause any damage! Make sure not to break down any windows or doors, or force your way inside the building. Don’t shift any items, such as machinery or furniture. Also, don’t take anything as a souvenir from the location. The idea is to leave no trace inside the premise. Keep things as they are!
7.Be Cautious And Carry Safety Equipment
Make sure to proceed cautiously, as old buildings are dangerous and can collapse. Also, check out the building for intact roofing before entering it. Many old buildings can expose you to asbestos, moulds, and dust. And this can harm your respiratory system. And, which is why always make sure to pack a gas mask.
8.Talk And Get Information From An Experienced Urbex Photographer
If you have never done urban exploration photography, do talk to an expert! Plus an expert will give you proper guidance and give you some insight. Urbex photography is dangerous to a certain extent. Do carry out a lot of research to prepare. Don’t forget to read the experiences of other urbex photographers. It will help you to know what to expect.
9.Avoid Strangers When Exploring
You never know who you’ll run into when doing urban exploration photography. If you do come across intruders, don’t strike up a conversation! It’s best to avoid these strangers and do your work. You never know why they are there and their true intentions. However, for safety, it’s best to leave the premise immediately in such cases.
10.Don’t Disclose The Location Information To Everyone
Not everyone is interested in photography. Many people look for these places to vandalize. You never know one’s true intentions. It’s best to share the location information with other urban exploration photographers only.
To Wrap Up
Urban exploration photography is a great adventure. Yes, there are risks associated with it! However, if you follow the safety rules, all’s well! If you follow these tips, you’ll be on the safe side. If you are looking for excitement, do give urbex a try. Who knows, you might end up falling in love with it!
It’s kind of neat that we can do input:invalid {} in CSS to style an input when it’s in an invalid state. Yet, used exactly like that, the UX is pretty bad. Say you have . That’s immediately invalid before the user has done anything. That’s such a bummer UX that you never see it used in the wild. But if we could just avoid that one thing, that :invalid selector can do a ton of work for us in form validation without needing to lean on a big fancy library.
Now you’re only conditionally applying those native error styles when you’ve determined the form to be in an error state and added a class. And fortunately, testing that is pretty easy too. We could apply that class when the submit button is clicked:
Or you could do it when an input blurs or something. You could even wrap each input set in a wrapper and toggle the class on the wrapper when appropriate. The commented out code here could get you going there…
CodePen Embed Fallback
Dave kicked this idea over to Vue:
CodePen Embed Fallback
We initialize the form component with errors: false because we don’t want the error styling until the user has submitted the form. The invalidateForm function just sets this.error = true. That’s one problem with the CSS :invalid pseudo class, it’s way too eager. Hooking into the invalid events, delays the styling until after the first form submission attempt and we know the form has errors.
Not using any library (on top of what you already use) is pretty sweet. HTML form validation is pretty much there. Here’s a fork of Dave’s where error messaging is revealed as well:
The Jamstack is a modern web development architecture based on client-side JavaScript, reusable APIs, and prebuilt Markup.
The key aspects of a Jamstack application are the following:
The entire app runs on a CDN (or ADN). CDN stands for Content Delivery Network and an ADN is an Application Delivery Network.
Everything lives in Git.
Automated builds run with a workflow when developers push the code.
There’s Automatic deployment of the prebuilt markup to the CDN/ADN.
Reusable APIs make hasslefree integrations with many of the services. To take a few examples, Stripe for the payment and checkout, Mailgun for email services, etc. We can also write custom APIs targeted to a specific use-case. We will see such examples of custom APIs in this article.
It’s practically Serverless. To put it more clearly, we do not maintain any servers, rather make use of already existing services (like email, media, database, search, and so on) or serverless functions.
In this article, we will learn how to build a Jamstack application that has:
A global data store with GraphQL support to store and fetch data with ease. We will use Fauna to accomplish this.
Serverless functions that also act as the APIs to fetch data from the Fauna data store. We will use Netlify serverless functions for this.
Finally we will deploy the app on a CDN configured and managed by Netlify CDN.
So, what are we building today?
We all love shopping. How cool would it be to manage all of our shopping notes in a centralized place? So we’ll be building an app called ‘shopnote’ that allows us to manage shop notes. We can also add one or more items to a note, mark them as done, mark them as urgent, etc.
At the end of this article, our shopnote app will look like this,
TL;DR
We will learn things with a step-by-step approach in this article. If you want to jump into the source code or demonstration sooner, here are links to them.
All the source code used in this article is in my GitHub repo. Feel free to follow it, as I keep updating the source code frequently. https://github.com/atapas/shopnote
Set up Fauna
Fauna is the data API for client-serverless applications. If you are familiar with any traditional RDBMS, a major difference with Fauna would be, it is a relational NOSQL system that gives all the capabilities of the legacy RDBMS. It is very flexible without compromising scalability and performance.
Fauna supports multiple APIs for data-access,
GraphQL: An open source data query and manipulation language. If you are new to the GraphQL, you can find more details from here, https://graphql.org/
Fauna Query Language (FQL): An API for querying Fauna. FQL has language specific drivers which makes it flexible to use with languages like JavaScript, Java, Go, etc. Find more details of FQL from here.
In this article we will explain the usages of GraphQL for the ShopNote application.
First thing first, sign up using this URL. Please select the free plan which is with a generous daily usage quota and more than enough for our usage.
Next, create a database by providing a database name of your choice. I have used shopnotes as the database name.
After creating the database, we will be defining the GraphQL schema and importing it into the database. A GraphQL schema defines the structure of the data. It defines the data types and the relationship between them. With schema we can also specify what kind of queries are allowed.
At this stage, let us create our project folder. Create a project folder somewhere on your hard drive with the name, shopnote. Create a file with the name, shopnotes.gql with the following content:
type ShopNote {
name: String!
description: String
updatedAt: Time
items: [Item!] @relation
}
type Item {
name: String!
urgent: Boolean
checked: Boolean
note: ShopNote!
}
type Query {
allShopNotes: [ShopNote!]!
}
Here we have defined the schema for a shopnote list and item, where each ShopNote contains name, description, update time and a list of Items. Each Item type has properties like, name, urgent, checked and which shopnote it belongs to.
Note the @relation directive here. You can annotate a field with the @relation directive to mark it for participating in a bi-directional relationship with the target type. In this case, ShopNote and Item are in a one-to-many relationship. It means, one ShopNote can have multiple Items, where each Item can be related to a maximum of one ShopNote.
You can read more about the @relation directive from here. More on the GraphQL relations can be found from here.
As a next step, upload the shopnotes.gql file from the Fauna dashboard using the IMPORT SCHEMA button,
Upon importing a GraphQL Schema, FaunaDB will automatically create, maintain, and update, the following resources:
Collections for each non-native GraphQL Type; in this case, ShopNote and Item.
Basic CRUD Queries/Mutations for each Collection created by the Schema, e.g. createShopNoteallShopNotes; each of which are powered by FQL.
For specific GraphQL directives: custom Indexes or FQL for establishing relationships (i.e. @relation), uniqueness (@unique), and more!
Behind the scene, Fauna will also help to create the documents automatically. We will see that in a while.
Fauna supports a schema-free object relational data model. A database in Fauna may contain a group of collections. A collection may contain one or more documents. Each of the data records are inserted into the document. This forms a hierarchy which can be visualized as:
Here the data record can be arrays, objects, or of any other supported types. With the Fauna data model we can create indexes, enforce constraints. Fauna indexes can combine data from multiple collections and are capable of performing computations.
At this stage, Fauna already created a couple of collections for us, ShopNote and Item. As we start inserting records, we will see the Documents are also getting created. We will be able view and query the records and utilize the power of indexes. You may see the data model structure appearing in your Fauna dashboard like this in a while,
Point to note here, each of the documents is identified by the unique ref attribute. There is also a ts field which returns the timestamp of the recent modification to the document. The data record is part of the data field. This understanding is really important when you interact with collections, documents, records using FQL built-in functions. However, in this article we will interact with them using GraphQL queries with Netlify Functions.
With all these understanding, let us start using our Shopenotes database that is created successfully and ready for use.
Let us try some queries
Even though we have imported the schema and underlying things are in place, we do not have a document yet. Let us create one. To do that, copy the following GraphQL mutation query to the left panel of the GraphQL playground screen and execute.
mutation {
createShopNote(data: {
name: "My Shopping List"
description: "This is my today's list to buy from Tom's shop"
items: {
create: [
{ name: "Butther - 1 pk", urgent: true }
{ name: "Milk - 2 ltrs", urgent: false }
{ name: "Meat - 1lb", urgent: false }
]
}
}) {
_id
name
description
items {
data {
name,
urgent
}
}
}
}
Note, as Fauna already created the GraphQL mutation classes in the background, we can directly use it like, createShopNote. Once successfully executed, you can see the response of a ShopNote creation at the right side of the editor.
The newly created ShopNote document has all the required details we have passed while creating it. We have seen ShopNote has a one-to-many relation with Item. You can see the shopnote response has the item data nested within it. In this case, one shopnote has three items. This is really powerful. Once the schema and relation are defined, the document will be created automatically keeping that relation in mind.
Now, let us try fetching all the shopnotes. Here is the GraphQL query:
query {
allShopNotes {
data {
_id
name
description
updatedAt
items {
data {
name,
checked,
urgent
}
}
}
}
}
Let’s try the query in the playground as before:
Now we have a database with a schema and it is fully operational with creating and fetch functionality. Similarly, we can create queries for adding, updating, removing items to a shopnote and also updating and deleting a shopnote. These queries will be used at a later point in time when we create the serverless functions.
If you are interested to run other queries in the GraphQL editor, you can find them from here,
Create a Server Secret Key
Next, we need to create a secured server key to make sure the access to the database is authenticated and authorized.
Click on the SECURITY option available in the FaunaDB interface to create the key, like so,
On successful creation of the key, you will be able to view the key’s secret. Make sure to copy and save it somewhere safe.
We do not want anyone else to know about this key. It is not even a good idea to commit it to the source code repository. To maintain this secrecy, create an empty file called .env at the root level of your project folder.
Edit the .env file and add the following line to it (paste the generated server key in the place of, ).
FAUNA_SERVER_SECRET=<YOUR_FAUNA_KEY_SECRET>
Add a .gitignore file and write the following content to it. This is to make sure we do not commit the .env file to the source code repo accidentally. We are also ignoring node_modules as a best practice.
.env
We are done with all that had to do with Fauna’s setup. Let us move to the next phase to create serverless functions and APIs to access data from the Fauna data store. At this stage, the directory structure may look like this,
Set up Netlify Serverless Functions
Netlify is a great platform to create hassle-free serverless functions. These functions can interact with databases, file-system, and in-memory objects.
Netlify functions are powered by AWS Lambda. Setting up AWS Lambdas on our own can be a fairly complex job. With Netlify, we will simply set a folder and drop our functions. Writing simple functions automatically becomes APIs.
First, create an account with Netlify. This is free and just like the FaunaDB free tier, Netlify is also very flexible.
Now we need to install a few dependencies using either npm or yarn. Make sure you have nodejs installed. Open a command prompt at the root of the project folder. Use the following command to initialize the project with node dependencies,
npm init -y
Install the netlify-cli utility so that we can run the serverless function locally.
npm install netlify-cli -g
Now we will install two important libraries, axios and dotenv. axios will be used for making the HTTP calls and dotenv will help to load the FAUNA_SERVER_SECRET environment variable from the .env file into process.env.
yarn add axios dotenv
Or:
npm i axios dotenv
Create serverless functions
Create a folder with the name, functions at the root of the project folder. We are going to keep all serverless functions under it.
Now create a subfolder called utils under the functions folder. Create a file called query.js under the utils folder. We will need some common code to query the data store for all the serverless functions. The common code will be in the query.js file.
First we import the axios library functionality and load the .env file. Next, we export an async function that takes the query and variables. Inside the async function, we make calls using axios with the secret key. Finally, we return the response.
Time to test the serverless function like an API. We need to do a one time setup here. Open a command prompt at the root of the project folder and type:
netlify login
This will open a browser tab and ask you to login and authorize access to your Netlify account. Please click on the Authorize button.
Next, create a file called, netlify.toml at the root of your project folder and add this content to it,
[build]
functions = "functions"
[[redirects]]
from = "/api/*"
to = "/.netlify/functions/:splat"
status = 200
This is to tell Netlify about the location of the functions we have written so that it is known at the build time.
Netlify automatically provides the APIs for the functions. The URL to access the API is in this form, /.netlify/functions/get-shopnotes which may not be very user-friendly. We have written a redirect to make it like, /api/get-shopnotes.
Ok, we are done. Now in command prompt type,
netlify dev
By default the app will run on localhost:8888 to access the serverless function as an API.
Open a browser tab and try this URL, http://localhost:8888/api/get-shopnotes:
Congratulations!!! You have got your first serverless function up and running.
Let us now write the next serverless function to create a ShopNote. This is going to be simple. Create a file named, create-shopnote.js under the functions folder. We need to write a mutation by passing the required parameters.
Please give your attention to the parameter, ShopNotesItemRelation. As we had created a relation between the ShopNote and Item in our schema, we need to maintain that while writing the query as well.
We have de-structured the payload to get the required information from the payload. Once we got those, we just called the query method to create a ShopNote.
Alright, let’s test it out. You can use postman or any other tools of your choice to test it like an API. Here is the screenshot from postman.
Great, we can create a ShopNote with all the items we want to buy from a shopping mart. What if we want to add an item to an existing ShopNote? Let us create an API for it. With the knowledge we have so far, it is going to be really quick.
Remember, ShopNote and Item are related? So to create an item, we have to mandatorily tell which ShopNote it is going to be part of. Here is our next serverless function to add an item to an existing ShopNote.
We are passing the item properties like, name, if it is urgent, the check value and the note the items should be part of. Let’s see how this API can be called using postman,
As you see, we are passing the id of the note while creating an item for it.
We won’t bother writing the rest of the API capabilities in this article, like updating, deleting a shop note, updating, deleting items, etc. In case, you are interested, you can look into those functions from the GitHub Repository.
However, after creating the rest of the API, you should have a directory structure like this,
We have successfully created a data store with Fauna, set it up for use, created an API backed by serverless functions, using Netlify Functions, and tested those functions/routes.
Congratulations, you did it. Next, let us build some user interfaces to show the shop notes and add items to it. To do that, we will use Gatsby.js (aka, Gatsby) which is a super cool, React-based static site generator.
The following section requires you to have basic knowledge of ReactJS. If you are new to it, you can learn it from here. If you are familiar with any other user interface technologies like, Angular, Vue, etc feel free to skip the next section and build your own using the APIs explained so far.
Set up the User Interfaces using Gatsby
We can set up a Gatsby project either using the starter projects or initialize it manually. We will build things from scratch to understand it better.
Install gatsby-cli globally.
npm install -g gatsby-cli
Install gatsby, react and react-dom
yarn add gatsby react react-dom
Edit the scripts section of the package.json file to add a script for develop.
"scripts": {
"develop": "gatsby develop"
}
Gatsby projects need a special configuration file called, gatsby-config.js. Please create a file named, gatsby-config.js at the root of the project folder with the following content,
module.exports = {
// keep it empty
}
Let’s create our first page with Gatsby. Create a folder named, src at the root of the project folder. Create a subfolder named pages under src. Create a file named, index.js under src/pages with the following content:
Let’s run it. We generally need to use the command gatsby develop to run the app locally. As we have to run the client side application with netlify functions, we will continue to use, netlify dev command.
netlify dev
That’s all. Try accessing the page at http://localhost:8888. You should see something like this,
Gatsby project build creates a couple of output folders which you may not want to push to the source code repository. Let us add a few entries to the .gitignore file so that we do not get unwanted noise.
Add .cache, node_modules and public to the .gitignore file. Here is the full content of the file:
.cache
public
node_modules
*.env
At this stage, your project directory structure should match with the following:
Thinking of the UI components
We will create small logical components to achieve the ShopNote user interface. The components are:
Header: A header component consists of the Logo, heading and the create button to create a shopnote.
Shopenotes: This component will contain the list of the shop note (Note component).
Note: This is individual notes. Each of the notes will contain one or more items.
Item: Each of the items. It consists of the item name and actions to add, remove, edit an item.
You can see the sections marked in the picture below:
Install a few more dependencies
We will install a few more dependencies required for the user interfaces to be functional and look better. Open a command prompt at the root of the project folder and install these dependencies,
yarn add bootstrap lodash moment react-bootstrap react-feather shortid
Lets load all the Shop Notes
We will use the Reactjs useEffect hook to make the API call and update the shopnotes state variables. Here is the code to fetch all the shop notes.
Finally, let us change the return section to use the shopnotes data. Here we are checking if the data is loaded. If so, render the Shopnotes component by passing the data we have received using the API.
You can find the entire index.js file code from here The index.js file creates the initial route(/) for the user interface. It uses other components like, Shopnotes, Note and Item to make the UI fully operational. We will not go to a great length to understand each of these UI components. You can create a folder called components under the src folder and copy the component files from here.
Finally, the index.css file
Now we just need a css file to make things look better. Create a file called index.css under the pages folder. Copy the content from this CSS file to the index.css file.
That’s all. We are done. You should have the app up and running with all the shop notes created so far. We are not getting into the explanation of each of the actions on items and notes here not to make the article very lengthy. You can find all the code in the GitHub repo. At this stage, the directory structure may look like this,
A small exercise
I have not included the Create Note UI implementation in the GitHib repo. However, we have created the API already. How about you build the front end to add a shopnote? I suggest implementing a button in the header, which when clicked, creates a shopnote using the API we’ve already defined. Give it a try!
Let’s Deploy
All good so far. But there is one issue. We are running the app locally. While productive, it’s not ideal for the public to access. Let’s fix that with a few simple steps.
Make sure to commit all the code changes to the Git repository, say, shopnote. You have an account with Netlify already. Please login and click on the button, New site from Git.
Next, select the relevant Git services where your project source code is pushed. In my case, it is GitHub.
Browse the project and select it.
Provide the configuration details like the build command, publish directory as shown in the image below. Then click on the button to provide advanced configuration information. In this case, we will pass the FAUNA_SERVER_SECRET key value pair from the .env file. Please copy paste in the respective fields. Click on deploy.
You should see the build successful in a couple of minutes and the site will be live right after that.
In Summary
To summarize:
The Jamstack is a modern web development architecture based on client-side JavaScript, reusable APIs, and prebuilt Markup.
70% – 80% of the features that once required a custom back-end can now be done either on the front end or there are APIs, services to take advantage of.
Fauna provides the data API for the client-serverless applications. We can use GraphQL or Fauna’s FQL to talk to the store.
Netlify serverless functions can be easily integrated with Fauna using the GraphQL mutations and queries. This approach may be useful when you have the need of custom authentication built with Netlify functions and a flexible solution like Auth0.
Gatsby and other static site generators are great contributors to the Jamstack to give a fast end user experience.
Thank you for reading this far! Let’s connect. You can @ me on Twitter (@tapasadhikary) with comments, or feel free to follow.
Let’s take a look at how to combine the border-image property in CSS with animated SVGs that move around a border. In the process, we’ll cover how to hand-craft resizable, nine-slice animated SVGs that you can use not only re-create the effect, but to make it your own.
Here’s what we’re making:
This is actually part of The Skull, a capture-the-flag riddle I’m working on that’s designed to explore the internals of Arduino and its microcontroller. I searched how to animate a border like this, but couldn’t find any useful examples. Most of the stuff I found was about marching ants, but unfortunately, the stroke-dasharray trick doesn’t work with skulls, let alone more complex shapes.
So, in the spirit of learning and sharing, I’m blogging about it here with you!
Should we use background or border-image?
At first, I didn’t even know border-image was a thing. I tried using a ::before pseudo-element in my first attempt, and animated its background-position property. That got my this far:
CodePen Embed Fallback
As you can see, it worked, but completing the border would require at least eight different elements (or pseudo-elements). Not ideal to clutter the HTML like that.
I posted a question on the Israeli CSS developers Facebook group, and everyone pointed me at the border-image property. It does exactly what it says on the tin: use an image (or CSS gradient) for an element’s border.
To work with border-image, you have to provide it an image which is used in a nine-slice way (think of a tic-tac-toe board over the image). Each of those nine regions represents a different part of the border: the top, right, left, and bottom, each of the four corners, and then the middle (which is ignored).
For instance, if we just wanted just static skulls, we could take advantage of SVG patterns to repeat the skull nine times. First, we define an 24×24 pattern using the skull’s path, and then use this pattern as the fill for a 72×72 rect:
Now we can animate those skulls! It works, uh, for the most part.
The idea is to create a different animation for each region in the border image. For instance, in the top-left corner, we have one skull going from the right-to-left, while a second skull goes from top- to-bottom at the same time.
We’ll animate the transform property for the movement. We’ll also take advantage of SVG’s to avoid repeating the lengthy definition for each skull:
<svg version="1.1" height="96" width="96" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
@keyframes left {to {transform: translate(-32px, 0)}}
@keyframes down {to {transform: translate(0, 32px)}}
</style>
<defs>
<path id="skull" d="..." fill="red"/>
</defs>
<!-- Top-left corner: one skull goes left, another goes down -->
<use href="#skull" x="0" y="0" style="animation: down .4s infinite linear"/>
<use href="#skull" x="32" y="0" style="animation: left .4s infinite linear"/>
</svg>
The SVG animation syntax might look familiar there, because rather than some SVG-specific syntax, like SMIL, it’s just using CSS animations. Cool, right?
This is what we get:
And if we add a grid, we can see how this animation also covers some of the top and left edges as well:
It starts looking more impressive after we add the remaining three edges, thus completely covering all the eight regions of the border image:
<svg version="1.1" height="96" width="96" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
@keyframes left {to {transform: translate(-32px, 0)}}
@keyframes down {to {transform: translate(0, 32px)}}
@keyframes right {to {transform: translate(32px, 0)}}
@keyframes up {to {transform: translate(0, -32px)}}
</style>
<defs>
<path id="skull" d="..." fill="red"/>
</defs>
<!-- Top-left corner: one skull goes left, another goes down -->
<use href="#skull" x="0" y="0" style="animation: down .4s infinite linear"/>
<use href="#skull" x="32" y="0" style="animation: left .4s infinite linear"/>
<!-- Top-right corner: one skull goes up, another goes left -->
<use href="#skull" x="64" y="0" style="animation: left .4s infinite linear"/>
<use href="#skull" x="64" y="32" style="animation: up .4s infinite linear"/>
<!-- Bottom-left corner: one skull goes down, another goes right -->
<use href="#skull" x="0" y="32" style="animation: down .4s infinite linear"/>
<use href="#skull" x="0" y="64" style="animation: right .4s infinite linear"/>
<!-- Bottom-right corner: one skull goes right, another goes up -->
<use href="#skull" x="32" y="64" style="animation: right .4s infinite linear"/>
<use href="#skull" x="64" y="64" style="animation: up .4s infinite linear"/>
</svg>
And this gives us a complete circuit:
Putting everything together, we use the animated SVG we’ve just created as the border-image, and get the desired result:
CodePen Embed Fallback
I could play with this all day…
Once I got this to work, I started tinkering with the animation properties. This is one of the advantages of using SVGs instead of GIFs: changing the nature of the animation is as easy as changing one CSS property in the SVG source file, and you get to see the result instantly, not to mention the smaller file sizes (especially if you are dealing with gradients), full color support and crisp scaling.
For starters, I tried to see what it would like like if I changed the animation timing function to ease:
CodePen Embed Fallback
We can also make the skulls fade between red and green:
CodePen Embed Fallback
We can even make the skulls change orientation as they go around the high score table:
CodePen Embed Fallback
Head to the JavaScript tab where you can tinker with the SVG source and try it for yourself.
The giant ? in the room (cough, Firefox)
I was very happy when I first got this to work. However, there are some caveats that you should be aware of. First and foremost, for some reason, Firefox doesn’t render the animation at the edges of the border, only at the corners:
Funny enough, if I changed the SVG to a GIF with the same animation, it worked perfectly fine. But then the edges stop animating on Chrome! ????
In any case, it seems to be a browser bug, because if we change the border-image-repeat property to stretch , Firefox does animate the edges, but the result is a bit quirky (though it can probably fit the theme of the page):
Changing the border-image-repeat value to space also seems to work, but only if the width of the element is not a whole multiple of the skull size, which means we get some gaps in the animation.
I also spotted a few visual issues in cases when the container size is not a multiple of the patch size (32px in this case), such as tiny black lines on the skulls. I suspect this has to do with some floating point rounding issue. It also tends to break when zooming in.
Not perfect, but definitely done! If you want to see the final version in action, you are invited to check out The Skull’s High Scores page. Hopefully, it’ll have some of your names on it very soon!
As human beings, we like to think that we’re rational creatures.
We tell ourselves that we make our decisions based on fact and logic. However, that’s rarely the full truth. As much as we try to make choices guided by rationality, the truth is that we’re often highly emotional people, driven by the way that things make us feel.
So, what does that mean for a website designer?
Though designing a functional and logical website is important, it’s crucial not to forget about the emotional impact of each interaction that your customer has with the sites that you build.
Sites that don’t elicit any kind of emotional response aren’t just boring; they’re forgettable.
A forgettable website is poison to any website designer’s portfolio.
That’s why we’re going to introduce you to some easy ways to use emotion in your designs this year.
Getting to the Bottom of Emotion in Web Design
First, you need to understand the part that emotion plays in user decisions.
Don Norman’s book Emotional Design says that there are many things that designers can do to make their designs more emotional. Even something as simple as focusing on the aesthetic impact of your website can make it more likely that you’ll reach your audience on an emotional level.
One important thing to remember about emotional design, is that it’s not just about making your customers feel good. Emotion can be both positive and negative. Sometimes negative emotion is more impactful than positive feelings – it all depends on the kind of site you’re trying to create.
A website selling health products to customers needs to make that audience feel comfortable and confident that they’re buying a trustworthy item. However, it may also need to trigger small feelings of worry or concern in the audience about what might happen if they don’t buy.
Knowing how to walk that balance between positive and negative feelings is how a designer takes a simple website design and turns it into something incredible.
So, where do you get started?
Step 1: Use Visual Elements to Trigger Emotion
Visual elements are one of the easiest points to get started with when you’re designing for emotion. That’s because visuals are fantastic at drawing out feelings.
An animation can create an emotional connection with your audience by helping them to understand how your product works or making them laugh when they land on your page. A genuine photograph of your team working together can inspire trust and feelings of affinity.
One of the most common visual elements used to trigger emotion is color.
Shades like blue and green in the digital design world are more likely to drive feelings of calmness and comfort. On the other hand, red and yellow often encourage feelings of enthusiasm and happiness.
The way that you use color can make a massive difference to how users feel when they arrive on a website. For instance, the Barclay’s website would have been pretty boring if it was just a basic black and white screen. However, a banking site can’t afford to go over the top with animations or illustrations in most cases, as this can detract from its professional image.
Adding small patches of blue in a way that complements the brand’s color palette is a great way to generate feelings of trust. Combined with the image of a genuine real-life person, and calm tones, the bank instantly presents itself as something approachable and honest.
At the same time, the clear hierarchical layout of the bank’s website, with an easy-to-follow navigation bar, easy-to-read font, and clear headings and buttons comfort the customer. Users get exactly what they expect when they come to a financial website, and that makes users feel as though they’re in the right place.
Step 2: Create Engaging and Emotional Interactions
Visual elements are a great way to embed emotion into digital design. However, they’re just the first step. The emotional aspects of your web design choices should also appear throughout the interactions that customers have with the website.
A good interaction on a website or app needs to be simple and straightforward enough that users feel comfortable taking the next step in their journey. However, it also needs to drive the right emotional response from users too.
For instance, when you sign up for a free account trial from Box.com, you don’t just get a form full of information that you need to fill out.
Next to the form, you also get information about what you’re signing up for, complete with small checks next to each of the free features you’re getting. This helps to put the customer’s mind at ease and remind them that they’re in the right place.
The use of a box, including discount information next to the sign-up form also helps to make the interaction more emotional, by reminding customers that they’re getting something for free.
Every time a customer interacts with a website, there’s another opportunity to engage them on an emotional level. On the Firebox website, when a customer adds something to their cart, there’s a small animation on the cart icon that informs them that something is waiting for them.
When they click through to the checkout, they get instant information, including what they can do to “gift wrap” their item, and buttons showing the various payment options available.
Whenever you’re designing a page for a website, whether it’s the checkout page, a product page, or something else entirely, think about the interaction that the visitor is having at that moment. How can you ensure that each customer feels more comfortable, delighted, informed, or engaged?
Step 3: Leverage Microcopy and Detail to Express Emotions
Visuals are an excellent way to express emotions.
However, they’re not the only option.
As a designer, you’ll need to think about how you can combine web design with the use of microcopy to connect with customers on a deeper level.
Rather than drawing attention to tedious, dull, or impersonal instructions, notifications, and error messages on a site, how you can you make sure that everything on the website delivers the same emotional impact?
The simple addition of a tiny illustration is enough to provide a much more emotional experience to customers. Compelling micro copy and illustrations on 404 pages can also strengthen the connections that customers have with the sites they visit.
Just look at how Google added a dinosaur game to the page that customers are sent to when they don’t have an internet connection.
The right micro copy and interactions can instantly transform even a negative experience, like not being able to connect to the internet, into something emotionally engaging and positive.
When it comes to making an emotional connection between your customer and their end users, web designers need to remember that often the smallest details can make the biggest differences. Little extra features, like implementing a way for customers to have fun when their internet connections aren’t working, are the things that make websites more memorable from an emotional perspective.
Don’t Choose Emotion Over Functionality
Although emotional impact can be an essential aspect of a fantastic website design, it’s important not to get carried away. Adding too much to a website in the form of little extra graphics and unique interactions could end up weighing down a site and making it slow to load.
Although it’s valuable to think about how every interaction an end-user has with a website will make them feel, it’s important not to overlook the basics of web design when you’re at it. You’ll still need to ensure that the finishing design is easy to use, engaging, and attractive.
Pay attention to the basics of user experience design, and make sure that the extra emotional elements you’re infusing into your sites aren’t going to damage the experience that end-users get.
If you can get the blend right between emotional impact and functionality, then you could create the kind of website that audiences will never forget.
It pays to implement emotion into your design portfolio.
“Vintage”. We hear it all the time. People call almost everything vintage (especially if they are trying to sell something to you). But what does it mean really? Is it something really old? No. That’s antique.
Perhaps something that was trendy a decade or so back? Nope. That’s retro. So what is vintage? We often hear people use it for retro and antique or anything that looks old to make it fancier. Well, officially, vintage is about wine. It’s a French term that found its way into English. But that’s not how we use the term, right? Pretty much. Vintage is defined by Ruby Lane as a product that reflects the era it was created in. So something that was produced in the 60s that reflects the taste of that era would be considered vintage. The catch is, vintage is only used for stuff that’s younger than 100 years old and older than 20 years old. So, in 10 years we wouldn’t consider something from the 1920s as vintage? Weird.
Anyway, it doesn’t end there. Vintage is also used in many different industries as a color palette. We see artwork, furniture, websites, etc. designed with a vintage color palette. But they weren’t created a couple of decades ago. In this case, a vintage color palette is a collection of colors that reflect a “vintage feel”.
What Makes a Proper Vintage Color Palette?
Unlike many different design styles and the color palettes they use, vintage color palettes don’t have a set requirement. As a color palette reflecting the 50s can be considered vintage, so can a palette from the 80s can be. Even something in black and white design can fit it. And we all know that there’s a huge difference between the two eras.
Instead of coming up with a definition or a set of requirements that would eventually restrict you, we did our research to find some great vintage color palette examples that you can use in your projects or get inspired from. We’ve added all of the links to the original sources so you have more places to visit and more examples to find. So without keeping you waiting, let’s have a look at some of the best vintage color palette examples we found for you.
Vintage Color Palette Examples
Vintage is a term that’s a bit overused to make things look more exciting. Also, many people mistake it for Retro. While something can have touches of retro in it, vintage is a lot wider. Anything from the past century can qualify as vintage and as a result, it’s quite difficult to narrow it down to a couple of color palettes. We hope this article helped you understand vintage color palettes better and we also hope that these examples we provided might prove useful for your projects.
You can create your own palettes in Photoshop or Illustrator. If you’re not sure which, check who’s the winner in Photoshop vs. Illustrator. Please let us know if you’ve created something with these vintage color palettes or if you feel like we missed an important example in the comments below.
It’s sounding more and more likely that we’re actually going to get real container queries. Google is prototyping a syntax idea from David Baron and refined by Miriam Suzanne. Apparently, there has already been some prototyping done for a switch() syntax which is like container queries on values. Even now, there is stuff like the Raven technique which can do container query-esque values. This stuff will shake out over time.
If you need solutions today, most of them involve JavaScript watching what is going on (i.e. the container width) and then giving you some kind of styling hooks (e.g. classes). Here’s a quick review of the “minimal takes” landscape:
Philip Walton shows how to homegrow that with ResizeObserver. Watch sizing, apply classes for styling hooks.
Heydon Pickering has a web component that leverages ResizeObserver. Watch sizing, apply classes for styling hooks. (See combination with resizeasaurus.)
Scott Jehl made a web component that leverages ResizeObserver. Watch sizing, apply data attributes for styling hooks.
Eric Portis made conditional-classes which leverages ResizeObserver and a clever (and valid) syntax involving CSS custom properties that end ups applying classes for styling hooks.
There is also Tommy Hodgins’ EQCSS, which does container queries (and other stuff) by looking through your CSS for the invented syntax that does these fancy things. I wouldn’t really call it minimalist, and it slightly creeps me out to ship invalid CSS syntax, but it does look robust.
First, quickly: AWS Amplify has a new Admin UI. Amplify always had a CLI that helps you build projects by setting up stuff like auth, storage, and APIs. That’s super useful, but now, you can do those things with the new Admin UI. And more, like model your data (!!), right from a local UI. That’s great for people like… me (I like my GUIs).
Now, slower.
Let’s start with the idea of Jamstack. Static Hosting + Services, right? Amplify is that: static hosting is part of the offering. You connect an Amplify project with a Git repo (you don’t have to, you could upload a zip, but let’s be real here). When you push to the designated branch on that repo (probably main or master), it deploys. That’s part of the magic of development today that we all know and love expect.
Static hosting might be all you need. Done.
But a lot of sites need more. Maybe your site is client-side rendered (for some of it), so the JavaScript hits an API for data and then renders. What data? What API? AWS has these things for you. For us front-enders, that’s probably AWS AppSync, which is like real-time GraphQL (cool). How do you set that up? Well, you can do it in the CLI, but it’s now way easier with the Amplify Admin UI.
Say you’re building a blog structure. Blogs have Posts, Posts have Comments. And so:
I’ll tell ya, coming from a WordPress upbringing and identifying mostly as a front-end developer, this feels doable to me. It’s not far from using Advanced Custom Fields in WordPress to model some data for a Custom Post Type. No wonder the line is so gray between front-end and back-end development.
Now that the Amplify Admin UI has this data modeled out, I can yank it down into my project and the whole schema is mocked out.
I’m bullish on GraphQL, but I can tell ya, all the setup of it is generally over my head. I’m generally very happy just being a consumer of a GraphQL API that is already set up, or doing minor tweaks. This, though, feels doable for me. The visual builder and the freebie scaffolding of the schema… yes please.
At this point then you have this project you can test and deploy. Once it’s deployed, there is a real data store in the cloud ready for data. How do you use it? It’s CRUD time! Create, Replicate, Update, and Delete, the core tenants of all good websites, right? Well, It’s Just JavaScript™. Here’s how you create a new blog, then a post in that blog:
import { DataStore } from '@aws-amplify/datastore';
import { Blog } from './models';
const newBlog = await DataStore.save(
new Blog({
"name": "Name of Blog"
})
);
await DataStore.save(
new Post({
"title": "Blog Post Title",
"blogID": newBlog.id
})
);
That all works because the database exists and our app knows all about the data model. But what is DataStore in AWS Amplify? That’s yet another thing that AWS Amplify helps with. They have libraries to make all this easier. You don’t have to manually write fetch calls and do error handling and all that… Amplify libraries make life easier with all sorts of helpers (like you see above).
With all that setup, this slide I saw in their developer preview I got a peak at should make sense
Back to the Jamstack thing… now we’ve got Static Hosting going and we can deploy our website to it. By the way, that can be anything. A vanilla HTML/CSS/JavaScript thing. A React, Vue, or Angular app. Native apps too. Amplify doesn’t care, it just helps with the deployment and services.
Here’s a look at the Admin UI, where you can see the navigation with all the services you can set up, deployment activity, the ability to model (and edit) data, etc.:
What else is in there? With auth for one. If you’re storing data and managing it with API’s, it’s highly likely you’ll be dealing with authentication as well. Amplify has you covered. Need some to run some code server-side? You’ve got your functions right in there of course. Lambdas (serverless functions) are AWS bread and butter. Analytics? You bet.
Another thing you’ll surely be interested in is the different development stories. Like what is local development like? Well, it’s super good. Guess what?! Those screenshots above of the Admin UI… those aren’t some online dashboard in the AWS console, those are locally hosted on your own site. All this data modeling and storage and editing and such happens locally. Then you can push to live to any environment. Production, of course, but also whatever sort of staging environments you need.
When you need production data pulled down locally, you just… do that (with a command given to you right in the Admin UI).
You can join the Amplify team to find out more – they’ll be demoing on Twitch with Q&A this week:
Thursday, Dec. 3rd at 10-11am PST/ 7pm GMT Friday, Dec. 4th at 1-3pm PST / 9pm GMT www.twitch.tv/aws
I’m thinking this new Admin UI world is going to open up AWS Amplify to a lot more people. Having a UI to manage your site just feels better. For someone like me, it gives me a more complete understanding of what is going on with the backend and services, and more control over things. And yet, give me total freedom on the front end to do what I want to do, and also handle so many of the things I don’t (deployment, SSL, etc.) ?