Fictif #13705
devmdo
started this conversation in
Show and tell
Fictif
#13705
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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
*.screen.vue
, and are placed inresources/screens
, are discovered, and defined with a path like this:path.to.welcome
forresources/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<Display>
,<Curtain>
, and<MultiStep>
to accelerate development.fast-glob
during development only.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:
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
Your project structure should look like:
That's all 🧨
Inertia-like Usage
If you have an inertiajs compatible backend, like laravel with inertia installed, do this in your
app.js
Yep, thats all, you can define your screens in
resources/screens
, dont forget to add thefictif()
vite plugin.Core Concepts
useRouter() & Events
The router is the heart of Fictif. It manages the visit lifecycle with a granular event system.
useForm()
The useForm composable provides a complete solution for form submissions, including state management, validation errors, and file uploads.
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.
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.
Beta Was this translation helpful? Give feedback.
All reactions