Ably and Next.js Starter Kit

R
Renaudil y a 2 jours
0

Description

Ably + Next.js starter for serverless WebSocket, real-time notifications, activity streams, chat, collaborative multiplayer experiences etc.

npx boilerapp ably-nextjs-starter-kit

Documentation

Ably serverless WebSockets and Next.js fundamentals starter kit

Ably serverless WebSockets and Next.js fundamentals starter kit demo

Description

This Ably and Next.js fundamentals starter kit demonstrates using some of the Ably's core functionality with Next.js. You can build features and use cases upon these fundamentals such as notifications, activity streams, chat, realtime visualisations and dashboards, and collaborative multiplayer experiences.

The Ably fundamentals demonstrated within this repo are:

  • Token Authentication - authenticate and establish a persistent bi-direction connection to the Ably platform.
  • Pub/Sub (Publish/Subscribe) - publish messages on channels and subscribe to channels to receive messages.
  • Presence - keep track of devices that are present on a channel. This is great for tracking if a device is online or offline or indicating if a user is in a chat room when using Ably for Chat.
  • History - Retrieve a history of messages that have been published to a channel.

The project uses the following components:

  • Next.js, a flexible React framework that gives you building blocks to create fast web applications.
  • Ably, for realtime messaging at scale.

Building & running locally

Prerequisites

  1. Sign up or log in to ably.com, and create a new app and copy the API key.
  2. To deploy to Vercel, create a Vercel account.

Configure the app

Create a .env.local file with your Ably API key:

echo "ABLY_API_KEY={YOUR_ABLY_API_KEY_HERE}">.env

Run the Next.js app

npm run dev
# or
yarn dev

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Deploy with Vercel

Contributing

Want to help contributing to this project? Have a look at our contributing guide!

More info


Ably logo

Prix

Gratuit

FREE

Commentaires (0)

FAQ

Questions Fréquemment Posées

Vous avez une question ? Nous avons les réponses. Si vous ne trouvez pas ce que vous cherchez, n'hésitez pas à nous contacter.

Boilerapp est une plateforme communautaire dédiée au partage de boilerplates, de starter kits et de modèles de projets pour développeurs. Notre objectif est simple : vous faire gagner du temps sur la configuration initiale (setup) pour que vous puissiez coder ce qui compte vraiment. Que vous cherchiez une simple base de code ou un projet SaaS complet, vous le trouverez ici.

Vous avez d'autres questions ?

Notre équipe est là pour vous aider. Contactez-nous et nous vous répondrons dès que possible.

Ably and Next.js Starter Kit | BoilerApp