All Projects β†’ TeXmeijin β†’ nextjs-microcms-tsx-jamstack-aspida-boilerplate

TeXmeijin / nextjs-microcms-tsx-jamstack-aspida-boilerplate

Licence: other
This is a Next.js^9.5 project bootstrapped with microCMS, aspida. And this is using TSX, Incremental Static Regeneration.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to nextjs-microcms-tsx-jamstack-aspida-boilerplate

vercel-examples
πŸ“¦ Example projects using Vercel platform. Using Node.js, PHP and others.
Stars: ✭ 205 (+1476.92%)
Mutual labels:  sample, vercel
Portfolio
A Next.js & Material UI portfolio that stylizes markdown files from the GitHub API and Contentful CMS.
Stars: ✭ 18 (+38.46%)
Mutual labels:  vercel
rust
πŸ¦€ Rust runtime for β–² Vercel Serverless Functions.
Stars: ✭ 339 (+2507.69%)
Mutual labels:  vercel
animeflix
A anime discovery, streaming site made with NextJs and TailwindCSS. Uses AniList API and video data from GogoAnime. No ads and no vpn required
Stars: ✭ 326 (+2407.69%)
Mutual labels:  vercel
code2img
Open REST API to create beautiful images of code snippets with 20+ color themes and syntax highlighting support for 10+ languages.
Stars: ✭ 25 (+92.31%)
Mutual labels:  vercel
hana-ml-samples
This project provides code examples for SAP HANA Predictive and Machine Learning scenarios and is educational content. It covers simple Predictive Analysis Library SQL examples as well as complete SAP HANA design-time β€œML scenario”-application content or HANA-ML Python Notebook examples.
Stars: ✭ 67 (+415.38%)
Mutual labels:  sample
next-microcms-sample
Next.js + microCMS SSG example.
Stars: ✭ 14 (+7.69%)
Mutual labels:  microcms
machine-learning-dgm
Learning to Remember: A Synaptic Plasticity Driven Framework for Continual Learning
Stars: ✭ 35 (+169.23%)
Mutual labels:  sample
Gestures-Samples
Project Prague Code Samples
Stars: ✭ 98 (+653.85%)
Mutual labels:  sample
youtube-json-server
Your personal Youtube API server to get Youtube API responses without needing credentials.
Stars: ✭ 32 (+146.15%)
Mutual labels:  vercel
pg sampletolog
Postgres extension to sample statements or transactions to logs
Stars: ✭ 17 (+30.77%)
Mutual labels:  sample
eventhub
Open-source event organizing web application and a reference DDD solution.
Stars: ✭ 97 (+646.15%)
Mutual labels:  sample
modplayer-js
JavaScript player for SoundTracker mod files using AudioWorklet API
Stars: ✭ 30 (+130.77%)
Mutual labels:  sample
MetalPlayer
A video player using Metal.
Stars: ✭ 68 (+423.08%)
Mutual labels:  sample
amazon-qldb-dmv-sample-nodejs
A DMV based example application which demonstrates how to use QLDB with the QLDB Driver for Node.js
Stars: ✭ 38 (+192.31%)
Mutual labels:  sample
screenREC
A really simple , ad-free & minimal web based screen recorder πŸ“Ή
Stars: ✭ 67 (+415.38%)
Mutual labels:  vercel
spring-kotlin-angular4
Another abadoned Spring Boot application with Angular and Kotlinabandoned
Stars: ✭ 22 (+69.23%)
Mutual labels:  sample
cvpr-buzz
🐝 Explore Trending Papers at CVPR
Stars: ✭ 37 (+184.62%)
Mutual labels:  tsx
onedrive-vercel-index
OneDrive public directory listing, powered by Vercel and Next.js
Stars: ✭ 1,725 (+13169.23%)
Mutual labels:  vercel
sendbird-javascript-samples
A guide of the installation and functions of Sendbird Chat, UIKit, and SyncManager for JavaScript samples.
Stars: ✭ 315 (+2323.08%)
Mutual labels:  sample

This is a Next.js project bootstrapped with microCMS, aspida. And this is using TSX, Incremental Static Regeneration.

This project will help you quickly implement JAMStack service with TypeScript-friendly.

Set up

Run the development server:

yarn
yarn dev

Open http://localhost:3000 with your browser to see the result.

TypeScript

This project is written in TypeScript. The configuration is tsconfig.json.

Page components are fully .tsx. And Next.js supported methods are also written in TypeScript.

For example, look at pages/articles/[id].tsx.

export const getStaticProps: GetStaticProps<{ article: MicroCmsArticle }> = async (context: GetStaticPropsContext<{id: string}>) => {
  // ...
}

Incremental Static Regeneration

This project supports Incremental Static Regeneration.

What's microCMS?

microCMS is a headless CMS service in Japan. It is similar to such as strapi, Contentful, DatoCMS, and so on.

Let's create account of microCMS for free, and make one api that has /articles path and create first article content.

This sample uses /articles API in microCMS. Please make an API that has /articles path, and it has following properties: title, body, description (there are string types).

Then you can access the api by below command.

curl "https://<your-project-name>.microcms.io/api/v1/articles" -H "X-API-KEY: <your api key>"

What's aspida?

Aspida is TypeScript friendly HTTP client wrapper for the browser and node.js.

Look types/apiClient directory.

Under the directory, you must define your backend API req/res types. And, run the command yarn build:api and you will get types/apiClient/$api.ts.

Then, check modules/apiClient.ts. This initializes aspida client and export it. With optimizing for microCMS APIs.

Notice: at local development, we can use aspida-mock. The library make us building mock server and response data by using same API as real backend APIs. Please look at modules/apiClient.ts.

You can get microCMS content by following code.

const article = await apiClient.articles._cmsId(id).$get()

Notice: each you implement API types under types/apiClient directory, you must run yarn build:api command.

Environments

You can touch the env file. Called .env.local

MICROCMS_GET_API_KEY=<your-microcms-get-api-key>
MICROCMS_BASE_URL=https://<your-project-name>.microcms.io/api/v1

Only this sample, aspida uses mock-server at local development. So the env file isn't needed. But you must set these env values at Vercel Platform console.

Deploy on Vercel

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

Check out our Next.js deployment documentation for more details.

ESLint

The settings for eslint and husky are also completed, but CSS in JS is not installed because there is no standard.

Of course, you can add and remove rules by editting .eslintrc.js.

Contribution

I'm not familiar with React and Next.js, so if you have any suggestions for resolving errors or better improvements, please contribute via issue or pull request.

Author

Twitter: @Meijin_garden

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].