Vzdělávejte se mimo lavice. Nechte se provést atraktivními lokacemi, vyřešte mnoho výzev a objevte nejednu geografickou zajímavost s bezplatnou mobilní aplikací.
Go to file
Ludvík Prokopec cb4c5a875e delete, create , update events 2022-12-02 09:04:44 +01:00
.vscode init 2022-12-01 12:25:45 +01:00
appwrite init 2022-12-01 12:25:45 +01:00
public init 2022-12-01 12:25:45 +01:00
src delete, create , update events 2022-12-02 09:04:44 +01:00
.editorconfig init 2022-12-01 12:25:45 +01:00
.gitignore init 2022-12-01 12:25:45 +01:00
.prettierrc init 2022-12-01 12:25:45 +01:00
LICENSE init 2022-12-01 12:25:45 +01:00
README.md Update readme 2022-12-01 22:45:04 +01:00
appwrite.sh init 2022-12-01 12:25:45 +01:00
index.html init 2022-12-01 12:25:45 +01:00
jsconfig.json init 2022-12-01 12:25:45 +01:00
package-lock.json init 2022-12-01 12:25:45 +01:00
package.json npm run appwrite 2022-12-02 08:52:51 +01:00
postcss.config.cjs init 2022-12-01 12:25:45 +01:00
tailwind.config.cjs init 2022-12-01 12:25:45 +01:00
tsconfig.json init 2022-12-01 12:25:45 +01:00
vite.config.js init 2022-12-01 12:25:45 +01:00

README.md

Svelte + Appwrite = 🚀

Blazing fast development with done backend and fully-prepared frontend.

Frontend included:

  • tailwind
  • scss
  • typescript
  • routing
  • ready routes
  • oauth
  • folder structure
  • common components
  • simple icons
  • service worker
  • path aliases
  • database realtime subscribers
  • vite

Included:

  • prettier
  • editorconfig

Database subscribers

  <script>
    import { createCollectionSubscriber } from '$lib/database'
    import Layout from '$lib/components/Layout'

    const subscriber = createCollectionSubscriber('[database-id]', '[collection-id]')
    // listen changes in database and automatically rerender on change
    // current data = [{ name: 'John', lastName: 'Doe' }, ...]
  </script>

  <Layout>
    {$subscriber ? $subscriber[0].name : ''}
  </Layout>
  <script>
    import { createDocumentSubscriber } from '$lib/database'
    import Layout from '$lib/components/Layout'

    const subscriber = createDocumentSubscriber('[database-id]', '[collection-id]', '[document-id]')
    // listen changes in database and automatically rerender on change
    // current data = { name: 'John', lastName: 'Doe' }
  </script>

  <Layout>
    {$subscriber?.name ?? ''}
  </Layout>

Routing

  <script>
    import { Router, Route, ProtectedRoute, Redirect, navigate, link, back, forward } from '$lib/router'
    import Home from './routes/home.svelte'
    import Profile from './routes/profile.svelte'
    import { account } from '$lib/stores/appwrite'
    import oauth from '$lib/stores/oauth'

    const user = oauth(account)
  </script>

  <main>
    <Router>
      <Route path="/" component={Home}>
      <ProtectedRoute path="/profile" allow={$user?.status} fallback="/" component={Profile}>

      <a href="/about" use:link>About us</a>
    </Router>
  </main>

Social auth icons

  <script>
    import { Github } from '@icons-pack/svelte-simple-icons'
    import Layout from '$lib/components/Layout'
    import { account, url } from '$lib/stores/appwrite'
  </script>

  <Layout>
    <button on:click={() => account.createOAuth2Session('github', url.oauth.success, url.oauth.failure)}>
      <Github />
    </button>
  </Layout>