DEV Community

Shriji
Shriji

Posted on • Edited on

2 1

Sapper, a framework for JAMstack applications

Alright, What the heck is Sapper?

Sapper is the companion framework of svelte, like how Next/Nuxt is for React/Vue.

JAMstack?

Javascript APIs and Markup is an architecture that is easy to build, maintain and scale.

The DEV API

Dev has great API documentation but there is still a lot of room for improvement.

Getting started with Sapper

This is the standard way to get a default starter template for docs head to Sapper site.

# for Rollup
npx degit "sveltejs/sapper-template#rollup" my-app
# for webpack
npx degit "sveltejs/sapper-template#webpack" my-app
cd my-app

npm install
npm run dev & open http://localhost:3000
Enter fullscreen mode Exit fullscreen mode

Now we got the all ingredients for making a JAMstack application we can start building the app but first, this is the anatomy of Sapper directory

src
├───components
│       Nav.svelte
└───routes
    │   about.svelte
    │   index.svelte
    │   _error.svelte
    │   _layout.svelte
    └───blog
            index.json.js
            index.svelte
            [slug].json.js
            [slug].svelte
            _posts.js
Enter fullscreen mode Exit fullscreen mode

The majority of the work is done inside the src folder. The next part will have details of how the blog is fetched from DEV API.

Pretext, SvelteKit is coming out and the same can be made using SvelteKit

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more