Giter VIP home page Giter VIP logo

blog-svelte-pocketbase-template's Introduction

⚠️ The project is mostly finished but you might encounter some bugs so please make an issue if any.

Watch the demo

An easy to use blog template ✒️

You can use pocketbase as I've done or you can tweak the template with whatever you want to use but I'll only show how to use the blog with pocketbase.

What can you do with pocketbase ?

  • Create articles with a simple built in markdown editor.
  • Have users interact with your article with comments.
  • Ability to 'ping' a user to interact with him in the comment section. (No notification yet)
  • Give others the ability to also write articles simply by changing their role in pocketbase.

How to install

First of course you have to clone or download this project.

Then you can start the blog simply by running :

# If you're using npm
npm run dev

# If you're using yarn
yarn dev

# If you're using pnpm
pnpm run dev

On the first run you'll probably encounter problems, of course it's because you don't have your pocketbase setup yet, so let's do that !

Download the exe file for pocketbase.

Place it in a directory named backend or whatever you want.

Then you can run this command (inside the directory you just created with pocketbase.exe inside it) that will automatically setup your pocketbase :

.\pocketbase serve

If you look closely in your terminal you'll see two links :

Server started at: http://127.0.0.1:8090
    - REST API: http://127.0.0.1:8090/api/
    - Admin UI: http://127.0.0.1:8090/_/

The first one with the route /api/ will be used to fetch or do whatever you do with a REST API usually.

The other on the other hand will be used as an admin panel.

"No joke sherlock it's literally named 'Admin UI'"

Yes I know but at least you can't say I didn't tell you aha, now you can go to the Admin UI and look around before doing the next step.

When you're done you can import the pb_schema.json in the root folder of this project to the Admin UI. This will give you everything you need to make the blog work.

Import to PocketBase

When the schema is imported you can check if all the collections have been added and then restart your front-end (if you didn't shut it down previously) and you'll see everything without errors now !

You'll also be able to connect and give you an editor role in pocketbase to start writing some articles !

I hope this template will be useful for your next blog !

PS : If you want to contribute to this project OR change anything on your own (for example the styling because it's not really good) please do it's your blog after all 😃.

blog-svelte-pocketbase-template's People

Contributors

okzmo avatar

Stargazers

 avatar

Watchers

 avatar

blog-svelte-pocketbase-template's Issues

I could not find the pb_schema.json

I would like to try this, but I was not able to import the collections into pocketbase. I did not find the pb_schema.json file in the root directory of the project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.