All Projects → nodes-vapor → Admin Panel Provider

nodes-vapor / Admin Panel Provider

Licence: mit
Build easy customizable admin features for your app ✍️

Programming Languages

javascript
184084 projects - #8 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to Admin Panel Provider

Apicore
Core API functionality (users & teams, passwords, emails, etc) for any service built with Vapor 3
Stars: ✭ 43 (-8.51%)
Mutual labels:  server-side-swift, vapor
Vaporuploads
Demonstrating uploads in Vapor 4. Particularly large streaming uploads.
Stars: ✭ 19 (-59.57%)
Mutual labels:  server-side-swift, vapor
Jet Bridge
Jet Bridge – Admin Panel Framework for your application
Stars: ✭ 904 (+1823.4%)
Mutual labels:  admin, admin-dashboard
Swiftserverside Vapor
🦄 Swift server open source projects based on the Swift 4.1 and Vapor 3 frameworks. (Swift 服务端开源项目)
Stars: ✭ 588 (+1151.06%)
Mutual labels:  server-side-swift, vapor
Leaf Error Middleware
Serve up custom 404 and server error pages for your Vapor App
Stars: ✭ 43 (-8.51%)
Mutual labels:  server-side-swift, vapor
Sleek Dashboard
Sleek Dashboard - Free Bootstrap 4 Admin Template and UI Kit
Stars: ✭ 690 (+1368.09%)
Mutual labels:  admin, admin-dashboard
Stacked
Stack traces for Swift on Mac and Linux 📚
Stars: ✭ 24 (-48.94%)
Mutual labels:  server-side-swift, vapor
Cleopatra
Admin Dashboard Template Built On Tailwind CSS
Stars: ✭ 521 (+1008.51%)
Mutual labels:  admin, admin-dashboard
React Material Admin
☄️React Material Admin is a React template built with Material-UI
Stars: ✭ 1,005 (+2038.3%)
Mutual labels:  admin, admin-dashboard
Url Encoded Form
📝 Parse and serialize url-encoded form data with Codable support.
Stars: ✭ 32 (-31.91%)
Mutual labels:  server-side-swift, vapor
Swiftybeaver
Convenient & secure logging during development & release in Swift 3, 4 & 5
Stars: ✭ 5,392 (+11372.34%)
Mutual labels:  server-side-swift, vapor
Softetheradmin
A Web UI for SoftEther VPN Server
Stars: ✭ 44 (-6.38%)
Mutual labels:  admin, admin-dashboard
Sockets
🔌 Non-blocking TCP socket layer, with event-driven server and client.
Stars: ✭ 559 (+1089.36%)
Mutual labels:  server-side-swift, vapor
Awesome Vapor
A curated list of Vapor-related awesome projects.
Stars: ✭ 783 (+1565.96%)
Mutual labels:  server-side-swift, vapor
Ngx Admin
Customizable admin dashboard template based on Angular 10+
Stars: ✭ 23,286 (+49444.68%)
Mutual labels:  admin, admin-dashboard
Viron
☕️ Automated Design-based Management Console.
Stars: ✭ 925 (+1868.09%)
Mutual labels:  admin, admin-dashboard
Vuetify Admin Dashboard
A Crud Admin panel made from Vue js and Vuetify
Stars: ✭ 481 (+923.4%)
Mutual labels:  admin, admin-dashboard
Vue Quasar Admin
Vue 2.0 admin-dashboard based on Quasar-Framework
Stars: ✭ 516 (+997.87%)
Mutual labels:  admin, admin-dashboard
React Saas Template
🌊 Template for building an SaaS / admin website using React + Material-UI
Stars: ✭ 942 (+1904.26%)
Mutual labels:  admin, admin-dashboard
Degree Material Admin Template
Angular material design admin template based on angular material.
Stars: ✭ 32 (-31.91%)
Mutual labels:  admin, admin-dashboard

Admin Panel ✍️

Swift Version Vapor Version Circle CI codebeat badge codecov Readme Score GitHub license

Admin Panel makes it easy to setup and maintain admin features for your Vapor project. Here's a list of some of the top feautures that comes out of the box with this package:

  • UI Components: Admin Panel is built using AdminLTE, a highly battle-tested and maintained Control Panel Template. This means that you'll have access to features from AdminLTE through Leaf tags.
  • User System: This package come with a (admin panel) user system with roles built-in. The package also handles welcome emails and reset-password flows.
  • SSO Support: Built-in support for adding your own custom SSO provider.
  • Activities: Need to broadcast certain updates to the admin panel users? No problem, Admin Panel gives you some convenient functionality to manage an activity log.

📦 Installation

Install package using SPM

Update your Package.swift file:

.package(url: "https://github.com/nodes-vapor/admin-panel-provider.git", .upToNextMinor(from: "0.7.0")),
targets: [
    .target(
        name: "App",
        dependencies: [
            ...
            "AdminPanelProvider"
        ]
    ),
    ...
]

Next time you run e.g. vapor update Admin Panel will be installed.

Install resources

Copy the Resources and Public folders from this repo into your project. You can download the repo as a zip and then move the folders to the root of your project. Remember to check that you're not overwriting any files in your project.

If you are using Meta don't forget to add the following paths to the exceptPaths array within meta.json:

  • "/bower_components/*"
  • "/dist/*"
  • "/plugins/*"

🚀 Getting started

Add provider

In your Config+Setup.swift (or wherever you setup your providers), make sure to add the Admin Panel provider:

import AdminPanelProvider

// ...

private func setupProviders() throws {
    // ...
    try addProvider(AdminPanelProvider.Provider.self)
}

Also make sure that you add the Fluent provider if it hasn't been already:

try addProvider(FluentProvider.Provider.self)

Setup view renderer

This package relies heavily on the Leaf view renderer. For Admin Panel to work, please make sure that you have added the LeafProvider:

import LeafProvider

// ...

private func setupProviders() throws {
    // ...
    try addProvider(LeafProvider.Provider.self)
}

Make sure your project is using Leaf as the view renderer. You can set leaf as your renderer by setting the key view to the value leaf in your droplet.json. In case it's not given yet, just add it:

"//": "Choose which view renderer to use",
"//": "leaf: Vapor's Leaf renderer",
"view": "leaf",

Seed a user

If you haven't added a SSO provider, the next thing you need to do is to seed a user in order to be able to login into your new admin panel. To do this, add the seeder command to your commands array in your droplet.json:

"//": "Choose which commands this application can run",
"//": "prepare: Supplied by the Fluent provider. Prepares the database (configure in fluent.json)",
"commands": [
    "prepare",
    "admin-panel:seeder"
],

Now you have two ways of running the seeder. You either run the seeder in your terminal by:

vapor build; vapor run admin-panel:seeder

Or you temporarily edit the Run scheme in Xcode and add admin-panel:seeder under "Arguments Passed On Launch". This will run the seeder when you run the project. Run the project and remove the argument after the user has been seeded.

The user that will be created using the seeder will have the following credentials:

Vapor & Fuzzy Array

Vapor has a Node.fuzzy array that's used for dynamically casting at runtime. If you're experiencing inconsistencies with rendering templates it's most likely because your fuzzy array is missing ViewData.self Ensure that you have added it to the array or that all of your models conform to JSON/Node. Example Node.fuzzy:

extension Config {
    public func setup() throws {
        // allow fuzzy conversions for these types
        // (add your own types here)
        Node.fuzzy = [JSON.self, Node.self, ViewData.self]

Custom Leaf tags

Admin Panel comes with a bunch of custom Leaf tags that help ease the burden of frontend development. Check out the full list here.

CORS:

It's highly recommended that you add the CORS middleware to your project.

🔧 Configurations

Admin Panel can be configured by (adding or) modifying the adminpanel.json config file. Below is a breakdown of the available keys.

Key Example value Required Description
name My Tech Blog No This will be the title inside of the admin panel.
baseUrl http://mytechblog.com No This will be used to generate urls for the admin panel (e.g. when resetting a password).
skin green-light No The skin to use for the admin panel. The options will correspond to the available skins supported by AdminLTE. Please omit the skin- prefix when specifying the skin.
email {"fromName": "Admin Panel", "fromAddress": "[email protected]"} ` No This will be used to configure the AdminPanel's mailer.

🔐 SSO

Single sign-on can be a convenient way to offer users of your project to login into your admin panel.

🏆 Credits

This package is developed and maintained by the Vapor team at Nodes. The package owner for this project is Steffen.

📄 License

This package is open-sourced software licensed under the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].