Skip to content

Commit

Permalink
Merge pull request #1 from upperdo/develop
Browse files Browse the repository at this point in the history
feat: protected route
  • Loading branch information
acidlake committed Oct 23, 2023
2 parents d434149 + 88092b2 commit 28fa696
Show file tree
Hide file tree
Showing 212 changed files with 7,940 additions and 46 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PUBLIC_APPWRITE_ENDPOINT="http://localhost/"
PUBLIC_APPWRITE_API_VERSION="v1"
PUBLIC_APPWRITE_PROJECT_ID="your-project-id"
PUBLIC_SELECTED_PLATFORM="appwrite"
67 changes: 45 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,60 @@
# create-svelte
# SvelteKit Appwrite BackOffice Template

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
Everything you need to build an Administration Panel Using Svelte/SvelteKit and AppWrite

## Creating a project
## Development

If you're seeing this, you've probably already done this step. Congrats!
If you want to begin the development process, follow this guide.

```bash
# create a new project in the current directory
npm create svelte@latest
git clone repo

# create a new project in my-app
npm create svelte@latest my-app
```

## Developing
# cd into directory
cd project-name/

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
# install dependencies
pnpm i

```bash
npm run dev
# create new env file and update the variables
copy .env.example .env

# or start the server and open the app in a new browser tab
npm run dev -- --open
# run the project
pnpm dev
```

## Building

To create a production version of your app:

```bash
npm run build
```
## Folder Structure
The project is well organized into the following folder structure, and use route grouping.

### Routes
- (auth) Here you will find a group of route with the auth layout ( Public route )
- (backoffice) Here you will find the admin panel ( Protected route )

### Lib
- common
- - constants All application constants are here, images, sizes, enums, colors, api_constants.
- - formatters Formatter utility class to format numbers into currency, format date etc.
- - local_storage Local Storage utility class
- - logger Logger utility class
- - utils Multiple helpers functions
- - validators Validator utility class for email, phone etc
- data Mock/Fake data
- features Here is where we will put the features for the application
- - authentication
- - dashboard
- localization Language files and localization utility class
- stores All application stores are going to be here
- ui All UI related to the application is going to be here
- - components Here is the component library
- - widgets this are a collection of common ui widgets that combine ui components into functional widgets

## Tech Stack

- SvelteKit
- Svelte
- TailwindCSS
- ShadCN-Svelte
- AppWrite

You can preview the production build with `npm run preview`.

Expand Down
13 changes: 13 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "new-york",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.postcss",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/ui/components",
"utils": "$lib/common/utils/shadcn-utility"
}
}
50 changes: 34 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,40 @@
"test:unit": "vitest"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"prettier": "^2.8.0",
"@playwright/test": "^1.39.0",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/kit": "^1.26.0",
"@tailwindcss/forms": "^0.5.6",
"@tailwindcss/typography": "^0.5.10",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.34.0",
"postcss": "^8.4.24",
"postcss-load-config": "^4.0.1",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2",
"vitest": "^0.32.2"
"svelte": "^4.2.2",
"svelte-check": "^3.5.2",
"tailwindcss": "^3.3.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.32.4"
},
"type": "module"
"type": "module",
"dependencies": {
"appwrite": "^13.0.0",
"bits-ui": "^0.6.2",
"clsx": "^2.0.0",
"formsnap": "^0.2.0",
"lucide-svelte": "^0.288.0",
"radix-icons-svelte": "^1.2.1",
"sveltekit-superforms": "^1.8.0",
"tailwind-merge": "^1.14.0",
"tailwind-variants": "^0.1.14",
"zod": "^3.22.4"
}
}
Loading

0 comments on commit 28fa696

Please sign in to comment.