Skip to content

Commit a10f439

Browse files
committed
Add static build output
1 parent 557c14f commit a10f439

File tree

101 files changed

+14425
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+14425
-81
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,26 @@ concurrency:
1717
cancel-in-progress: false
1818

1919
jobs:
20-
build:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
2124
runs-on: ubuntu-latest
25+
permissions:
26+
pages: write
27+
id-token: write
2228
steps:
2329
- name: Checkout
2430
uses: actions/checkout@v4
2531

26-
- name: Setup Node.js
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: "24.1.0"
30-
cache: "npm"
31-
32-
- name: Install dependencies
33-
run: npm ci
34-
3532
- name: Setup Pages
36-
id: pages
3733
uses: actions/configure-pages@v4
38-
with:
39-
static_site_generator: other
40-
41-
42-
43-
- name: Build with Next.js
44-
run: npm run build
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
NEXT_PUBLIC_SITE_URL: ${{ steps.pages.outputs.base_url }}
48-
NEXT_PUBLIC_BASE_PATH: ${{ steps.pages.outputs.base_path }}
49-
NEXT_STATIC_EXPORT: "true"
50-
NODE_ENV: "production"
51-
52-
- name: Verify output directory
53-
run: |
54-
if [ ! -d "./out" ]; then
55-
echo "Error: Output directory './out' does not exist."
56-
exit 1
57-
fi
5834

5935
- name: Upload artifact
6036
uses: actions/upload-pages-artifact@v3
6137
with:
6238
path: ./out
6339

64-
deploy:
65-
environment:
66-
name: github-pages
67-
url: ${{ steps.deployment.outputs.page_url }}
68-
runs-on: ubuntu-latest
69-
needs: build
70-
steps:
7140
- name: Deploy to GitHub Pages
7241
id: deployment
7342
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.contentlayer
66
.content-collections
77
.source
8-
/content/docs/
8+
99

1010
# cache
1111
.cache/
@@ -15,7 +15,6 @@
1515
/fi-plugins/
1616
/fi-plugins*/
1717
/.next/
18-
/out/
1918
/build
2019
*.tsbuildinfo
2120

README.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,57 @@ cd static-plugin-doc-site-3
3030

3131
# Install dependencies
3232
npm install
33+
```
34+
35+
### 2. Configuration (Rate Limit Fix)
36+
37+
To avoid GitHub API rate limits (60 requests/hour for unauthenticated users vs 5000/hour with a token), create a `.env.local` file:
38+
39+
1. Create a Personal Access Token (PAT) on GitHub: [Settings > Developer settings > PAT](https://github.com/settings/tokens) (No special scopes needed for public repos).
40+
2. Create `GITHUB_TOKEN` in `.env.local` file:
41+
```bash
42+
GITHUB_TOKEN=your_token_here
43+
```
44+
45+
### 3. Usage & Deployment
46+
47+
#### Fetch Documentation
48+
49+
This pulls the documentation MD/MDX files from the configured GitHub repositories.
50+
51+
```bash
52+
# Online: Fetch fresh content from GitHub
53+
npm run fetch-docs
54+
55+
# Offline/Cached: Use local cache only (no API calls)
56+
npm run fetch-docs:cache
57+
```
58+
59+
#### Build & Deploy
60+
61+
Since GitHub Actions may hit API limits easily, we recommend building locally and pushing the static site.
62+
63+
1. **Build locally**: This generates the `out/` folder.
64+
```bash
65+
npm run build
66+
```
67+
2. **Commit and Push**:
68+
```bash
69+
git add out
70+
git commit -m "Update docs and static build"
71+
git push
72+
```
73+
The GitHub Action will now automatically deploy the `out/` folder from your commit to GitHub Pages.
74+
75+
# Install dependencies
76+
77+
npm install
78+
3379
# or
80+
3481
pnpm install
35-
```
82+
83+
````
3684
3785
### 2. Environment Setup (Optional)
3886
@@ -41,7 +89,7 @@ Create a `.env.local` file in the root directory:
4189
```env
4290
GITHUB_TOKEN=your_github_personal_access_token_here
4391
NEXT_PUBLIC_SITE_URL=http://localhost:3000
44-
```
92+
````
4593

4694
#### Getting a GitHub Token
4795

content/docs/_meta.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"title": "Plugins",
3+
"pages": [
4+
"filament-tree",
5+
"filament-cms-website-plugin",
6+
"filament-tab-plugin",
7+
"filament-panzoom",
8+
"filament-scaffold",
9+
"simple-contact-form",
10+
"filament-firewall",
11+
"filament-translate-field",
12+
"filament-field-group",
13+
"filament-email-2fa",
14+
"filament-access-management"
15+
]
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"title": "Filament Access Management 1.x",
3+
"pages": [
4+
"overview"
5+
]
6+
}
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
title: Overview
3+
description: Complete user and role management solution for Filament applications with permissions, roles, and access control features.
4+
lastUpdated: 2026-03-02T10:21:10.447Z
5+
---
6+
7+
# filament-access-management
8+
9+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/solution-forest/filament-access-management.svg?style=flat-square)](https://packagist.org/packages/solution-forest/filament-access-management)
10+
[![Total Downloads](https://img.shields.io/packagist/dt/solution-forest/filament-access-management.svg?style=flat-square)](https://packagist.org/packages/solution-forest/filament-access-management)
11+
12+
13+
This is an authentication plugin for Filament Admin with Laravel-permission
14+
15+
## Installation
16+
17+
1. You can install the package via composer:
18+
```bash
19+
composer require solution-forest/filament-access-management
20+
```
21+
22+
2. Add the necessary trait to your User model:
23+
24+
```php
25+
26+
use SolutionForest\FilamentAccessManagement\Concerns\FilamentUserHelpers;
27+
28+
class User extends Authenticatable
29+
{
30+
use FilamentUserHelpers;
31+
}
32+
```
33+
34+
3. **Clear your config cache**:
35+
```bash
36+
php artisan optimize:clear
37+
# or
38+
php artisan config:clear
39+
```
40+
41+
4. Then execute the following commands:
42+
```bash
43+
php artisan filament-access-management:install
44+
```
45+
If you don't already have a user named `admin`, this command creates a **Super Admin User** with the following credentials:
46+
47+
- Name: admin
48+
- E-mail address: admin@("slug" pattern from config("app.name")).com
49+
- Password: admin
50+
51+
You can also create the super admin user with:
52+
53+
```bash
54+
55+
php artisan make:super-admin-user
56+
57+
```
58+
59+
5. In your config/app.php place this code in you providers section
60+
``` php
61+
'providers' => [
62+
63+
...
64+
65+
/*
66+
* Package Service Providers...
67+
*/
68+
\SolutionForest\FilamentAccessManagement\FilamentAuthServiceProvider::class,
69+
70+
...
71+
72+
],
73+
```
74+
75+
76+
77+
## Publish Configs, Views, Translations and Migrations
78+
79+
You can publish the configs, views, translations and migrations with:
80+
81+
```bash
82+
php artisan vendor:publish --tag="filament-access-management-config"
83+
84+
php artisan vendor:publish --tag="filament-access-management-views"
85+
86+
php artisan vendor:publish --tag="filament-access-management-translations"
87+
88+
php artisan vendor:publish --tag="filament-access-management-migrations"
89+
```
90+
91+
## Migration
92+
93+
```bash
94+
php artisan migrate
95+
```
96+
97+
## Usage
98+
99+
Upon installation, "Menu", "Users", "Roles" and "Permissions" pages will be created. Each user have roles and each role have permissions.
100+
101+
![image](https://user-images.githubusercontent.com/73818060/232434966-91ab94fe-620a-4894-8632-dbe5e535e5ae.png)
102+
103+
Manage Menu:
104+
![image](https://user-images.githubusercontent.com/73818060/232438118-0b4089e7-4ff0-40b8-93b1-c6d4c089ef14.png)
105+
106+
Manage Users and their roles:
107+
![image](https://user-images.githubusercontent.com/73818060/232437828-73039db1-8976-4a23-a14d-2943d9495a47.png)
108+
![image](https://user-images.githubusercontent.com/73818060/232437890-2db887e1-dcbb-4d96-b072-365720be66d7.png)
109+
110+
Manage Roles and their permissions:
111+
![image](https://user-images.githubusercontent.com/73818060/232438496-002b56d6-db98-4672-82cc-efcfc06fba9e.png)
112+
![image](https://user-images.githubusercontent.com/73818060/232438548-29b655bc-d683-4924-90b7-6ba25991d7ff.png)
113+
114+
Manage Permissions:
115+
![image](https://user-images.githubusercontent.com/73818060/232438632-e5d9a5e5-7ef5-4ca5-a330-37948acd9748.png)
116+
![image](https://user-images.githubusercontent.com/73818060/232438719-fc2bca0b-7233-4aae-bf87-9c1d8524e42d.png)
117+
118+
119+
120+
Create super admin user:
121+
122+
```bash
123+
124+
php artisan make:super-admin-user
125+
126+
```
127+
128+
Check permission:
129+
```bash
130+
131+
# Check by permission's name
132+
\SolutionForest\FilamentAccessManagement\Http\Auth\Permission::check($name)
133+
134+
# Check by http_path
135+
\SolutionForest\FilamentAccessManagement\Http\Auth\Permission::checkPermission($path)
136+
137+
```
138+
139+
Get current user:
140+
``` bash
141+
142+
\SolutionForest\FilamentAccessManagement\Facades\FilamentAuthenticate::user();
143+
144+
```
145+
146+
## Advance Usage
147+
148+
In default, the menu created will co-exist with the original menu of filament. To override the original menu with the menu from this package, modify `/config/filament-access-management.php` as following:
149+
150+
1. Set ```filament.navigation.enabled => true```
151+
152+
``` php
153+
154+
'filament' => [
155+
...
156+
'navigation' => [
157+
/**
158+
* Using db based filament navigation if true.
159+
*/
160+
'enabled' => true,
161+
/**
162+
* Table name db based filament navigation.
163+
*/
164+
'table_name' => 'filament_menu',
165+
/**
166+
* Filament Menu Model.
167+
*/
168+
'model' => Models\Menu::class,
169+
]
170+
...
171+
]
172+
173+
```
174+
175+
## Changelog
176+
177+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
178+
179+
## Contributing
180+
181+
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
182+
183+
## Security Vulnerabilities
184+
185+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
186+
187+
## Credits
188+
189+
- [Carly](https://github.com/n/a)
190+
- [All Contributors](../../contributors)
191+
192+
## License
193+
194+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
195+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"title": "Filament Access Management 2.x",
3+
"pages": [
4+
"overview"
5+
]
6+
}

0 commit comments

Comments
 (0)