Next.js starter your AI actually understands. Ship internal tools in days not weeks. Pre-order $199 $499 → [Get it now]

How to use GraphQL in React

Using GraphQL in React lets you request exactly the data your components need — no over-fetching, no under-fetching — with a single flexible endpoint. As the creator of CoreUI with 25 years of web development experience, I’ve used GraphQL in production React dashboards where the ability to query multiple data sources in one request dramatically reduced load times compared to multiple REST calls. For simple use cases, GraphQL works with a plain fetch call. For production apps with caching, optimistic updates, and subscriptions, Apollo Client is the standard choice. Both approaches are covered here so you can choose what fits your project.

Read More…

How to build a weather API in Node.js

Building a weather API proxy in Node.js serves two purposes: it hides your API keys from the client and adds caching to avoid hitting rate limits on the third-party weather service. As the creator of CoreUI with 25 years of backend development experience, I always proxy third-party API calls through a Node.js layer in production to maintain control over rate limiting, caching, and error handling. The key pattern is fetching from OpenWeatherMap on the server, caching responses in memory with a TTL, and returning clean, typed responses to your frontend. This also lets you normalize the response format independently of what the weather API returns.

Read More…

How to build a notes API in Node.js

A notes API extends the basic CRUD pattern with user ownership — each note belongs to a specific user and only that user can read, update, or delete it. As the creator of CoreUI with 25 years of backend development experience, I use this pattern as the template for any user-scoped resource API in Node.js. The key difference from a public API is that every query includes a userId filter from the JWT payload, ensuring users can never access each other’s data. This requires authentication middleware and a data model that links notes to users.

Read More…

How to build a todo API in Node.js

Building a todo API is the ideal first Node.js project because it covers every fundamental backend concept: creating, reading, updating, and deleting resources with a clean REST interface. As the creator of CoreUI with 25 years of backend development experience, I use this exact project structure as the starting point for more complex Node.js APIs. The key is using Prisma as the ORM for type-safe database access and adding input validation with Zod before any data touches the database. This combination gives you reliable data integrity and TypeScript-compatible queries from day one.

Read More…

How to build a dashboard backend in Node.js

A dashboard backend needs to serve aggregated data efficiently, handle authentication, and expose clean REST endpoints that your frontend can consume without over-fetching. As the creator of CoreUI with 25 years of backend development experience, I’ve built the API layers that power CoreUI’s admin templates and know what structure scales well from prototype to production. The key is organizing the project by feature, not by layer — routes, controllers, and services grouped together for each domain area. This makes the codebase navigable as it grows and keeps related logic colocated.

Read More…

How to build a weather app in React

Building a weather app is one of the best React exercises because it combines state management, async data fetching, user input, and conditional rendering in a realistic context. As the creator of CoreUI with 25 years of software development experience, I use this project to evaluate how well developers understand React’s core patterns. The key is structuring the app with a custom hook that handles the fetch logic, keeping the component clean and focused on rendering. This separation makes the code easy to extend with additional features like forecasts or location-based lookup.

Read More…

How to mock API in Vue tests

Mocking API calls in Vue tests ensures tests run fast, reliably, and without external dependencies. As the creator of CoreUI with over 10 years of Vue.js experience since 2014, I’ve written thousands of tests that mock API responses to verify component behavior under various scenarios. The most effective approach uses Vitest’s mocking utilities to mock fetch or axios calls, returning controlled responses for different test cases. This provides predictable, isolated tests that don’t depend on external services.

Read More…

How to expose gRPC in Node.js

Exposing gRPC services in Node.js enables building high-performance microservices that communicate using protocol buffers. As the creator of CoreUI with over 10 years of Node.js experience since 2014, I’ve built gRPC servers for real-time data processing, inter-service communication, and high-throughput APIs. The standard approach uses @grpc/grpc-js to create a server, define service implementations, and bind them to network ports. This provides type-safe, efficient service endpoints that outperform traditional REST APIs for many use cases.

Read More…

How to consume gRPC in Node.js

Consuming gRPC services in Node.js enables high-performance communication with microservices using protocol buffers instead of JSON. As the creator of CoreUI with over 10 years of Node.js experience since 2014, I’ve built numerous systems that consume gRPC services for real-time data processing and inter-service communication. The standard approach uses the @grpc/grpc-js package with .proto files to define service contracts and generate client code. This provides type-safe, efficient communication between services.

Read More…

How to use axios in Node.js

Making HTTP requests in Node.js applications often requires more features than the native fetch API provides, such as automatic JSON transformation, request cancellation, and interceptors. With over 10 years of experience building Node.js applications since 2014 and as the creator of CoreUI, a widely used open-source UI library, I’ve used axios in countless production backends and services. The most powerful and flexible approach is to use axios, a promise-based HTTP client that provides a rich feature set with a clean API. This method offers automatic JSON parsing, request and response interceptors, and built-in support for timeouts and error handling.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to loop inside React JSX
How to loop inside React JSX

How to Use JavaScript setTimeout()
How to Use JavaScript setTimeout()

What Does javascript:void(0) Mean?
What Does javascript:void(0) Mean?

The Wacky World of JavaScript: Unraveling the Oddities
The Wacky World of JavaScript: Unraveling the Oddities

Answers by CoreUI Core Team