npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fictif

v0.0.1

Published

The modern, hybrid framework for Vue 3.

Readme

Fictif

GitHub Repo NPM Package

What is Fictif?

Fictif is a full-stack application framework for building modern, server-driven web apps with Vue 3 — without needing to maintain a separate frontend API. It blends the power of classic server-side tools like Laravel with the speed of SPAs, offering a flexible, composable alternative to Inertia.js, Nuxt, and Vue Router.

Whether you're building Laravel hybrids, Electron apps, PWAs, or fully client-side SPAs, Fictif adapts effortlessly — with zero runtime dependencies and a tiny footprint.

Features

  • Auto Screen Discovery: You dont have to import all of your (pages/screens) to use them, all vue files that end with *.screen.vue, and are placed in resources/screens, are discovered, and defined with a path like this: path.to.welcome for resources/screens/path/to/welcome.screen.vue, the screen resolver has many other features like node_packages and vendor discovery (vendor::has.a.screen) and overrides that i will document later
  • Hybrid by Default: Get the best of both worlds. Build with server-side routing and controllers, but deliver a seamless, app-like experience to your users, or implement a client-side routing directly to your code.
  • Batteries Included: Ships with high-quality, unstyled components like <Display>, <Curtain>, and <MultiStep> to accelerate development.
  • Truly Composable API: A complete suite of Vue 3 composables (useRouter, useForm, useScreens, useHead) that provide a powerful and intuitive developer experience.
  • Minimal Dependencies: This package has zero runtime dependencies to be bundled with your built code, it uses a single dependency to help with screen resolving. namely fast-glob during development only.
  • Written in typescript: You can understand the usage just by looking at the code, IDE's like vscode will understand the package.
  • Secure & Performant: A tiny, dependency-free client, build-time route obfuscation, and first-class support for modern web security practices.

Documentation

We are currently writing documentation for this library, we will cover basic usage here.

Installation

This package is in its early beta version, we recommend not to use it in production environments, you can install the latest GitHub release:

pnpm i fictifhq/fictif#release
# or use npm

Or get stable releases from npm registry:

pnpm i fictif
# or use npm

Usage

For inertia-like usage, scroll down. Let's get straight to the point,

Add this to your vite.config.js


export default defineConfig({
    plugins: [
        vue(), // ... and other plugins you already have
        fictif()
    ],
});

Your project structure should look like:

resources/
    js/
        app.js
        ... Your javascript files
    css/
        ... Your css files
    screens/
        welcome.page.vue
        ... Your views ( screens )
import { createFictifApp } from 'fictif'
import 'fictif/style'

createFictifApp((route) => {
        route.get('/', (req) => {
            return view('welcome').with({
                // You can pass props here
                abcd: '2025'
            })
        });

        route.get('/:someArg', (req, someArg) => {
            return view('welcome').with({
                abcd: someArg
            })
        });

        // This is how to handle 404
        //route.get('*', (req, arg1) => {
        //    //
        //});
    });
<template>
    Hello {{ abcd }}
</template>

<script>
    const { abcd } = defineProps(['abcd']);
</script>

That's all 🧨

Inertia-like Usage

If you have an inertiajs compatible backend, like laravel with inertia installed, do this in your app.js

import { createFictifApp } from 'fictif'
import 'fictif/style'

createFictifApp();

// Theres plenty of things to customize, don't worry, i will document all of them soon.

Yep, thats all, you can define your screens in resources/screens, dont forget to add the fictif() vite plugin.

Core Concepts

useRouter() & Events

The router is the heart of Fictif. It manages the visit lifecycle with a granular event system.

import { useRouter } from 'fictif';

const router = useRouter(); // Get the globally initialized router

// Listen to lifecycle events
router.on('leaving', () => {
    if (hasUnsavedChanges()) {
        if (!confirm("Leave without saving?")) {
            router.preventNavigation();
        }
    }
});

router.on('navigation', () => progress.start());
router.on('navigated', () => progress.finish());
router.on('push', ({ page }) => {
    // The page state has been updated
    console.log('Now on component:', page.component);
});

// Programmatic navigation
router.go('/dashboard');

useForm()

The useForm composable provides a complete solution for form submissions, including state management, validation errors, and file uploads.

<script setup>
import { useForm } from 'fictif';

const form = useForm({
    name: 'John Doe',
    avatar: null,
});

const submit = () => {
    // This automatically handles FormData for file uploads
    form.post('/users');
};
</script>

<template>
  <form @submit.prevent="submit">
    <input type="text" v-model="form.data.name">
    <div v-if="form.errors.name">{{ form.errors.name }}</div>

    <input type="file" @input="form.data.avatar = $event.target.files[0]">

    <button type="submit" :disabled="form.processing">Save</button>
  </form>
</template>

RouterMap (For Client-Side Routing)

For SPAs or advanced routing needs, the RouterMap provides a powerful, Express.js-style API for defining your routes on the client.

// A custom resolver using RouterMap
import { RouterMap, response, redirect } from 'fictif';

const rm = new RouterMap();

// Apply a middleware to a group of routes
rm.middleware('auth', (req, next) => {
    if (!isLoggedIn()) {
        return redirect('/login').build();
    }
    return next(req);
});

rm.group(admin => {
    admin.get('/dashboard', () => response().component('admin.dashboard'));
    admin.get('/users', () => response().component('admin.users'));
}).prefix('/admin').applyMiddleware('auth');


// Use it in your router
const router = new Router({ resolve: rm });

Help

We have a Discord server in case you have any questions.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

Fictif is open-source software licensed under the MIT license.