|
37 | 37 | </p> |
38 | 38 |
|
39 | 39 | ## Overview |
| 40 | + |
40 | 41 | - **Always connected.** Manage punishments from anywhere with seamless logins |
41 | 42 | - **Cross platform.** It doesn't matter what OS you use, it just works wherever Node.js runs |
42 | 43 | - **Responsive interface.** Manage your community from any device at any time |
43 | 44 |
|
44 | 45 | To learn more about configuration, usage and features of BanManager, take a look at [the website](https://banmanagement.com/) or view [the demo](https://demo.banmanagement.com). |
45 | 46 |
|
46 | 47 | ## Features |
| 48 | + |
47 | 49 | - Appeal punishments |
48 | 50 | - Ban, unban, mute, and warn players |
49 | 51 | - Review and manage reports on the go |
50 | 52 | - Custom roles and flexible permissions |
51 | 53 | - A single interface for multiple Minecraft servers |
52 | 54 |
|
53 | | -## Requirements |
54 | | -- The latest [Node.js](https://nodejs.org/) LTS version (even numbered) |
| 55 | +## Installation (Production) |
| 56 | + |
| 57 | +For deploying BanManager WebUI on your own server, see the **[full installation guide](https://banmanagement.com/docs/webui/install)**. |
| 58 | + |
| 59 | +### Requirements |
| 60 | + |
| 61 | +- [Node.js](https://nodejs.org/) LTS (v20 or v22) |
55 | 62 | - MySQL v5+ or MariaDB v10+ |
56 | 63 | - Minecraft server with [BanManager](https://github.com/BanManagement/BanManager) & [BanManager-WebEnhancer](https://ci.frostcast.net/job/BanManager-WebEnhancer/) plugins configured to [use MySQL or MariaDB](https://banmanagement.com/docs/banmanager/install#setup-shared-database-optional) |
57 | 64 |
|
58 | | -## Installation |
59 | | -See [setup instructions](https://banmanagement.com/docs/webui/install) |
| 65 | +### Quick Install |
60 | 66 |
|
61 | | -## Development |
| 67 | +```bash |
| 68 | +git clone https://github.com/BanManagement/BanManager-WebUI.git |
| 69 | +cd BanManager-WebUI |
| 70 | +npm ci --production |
| 71 | +npm run setup |
62 | 72 | ``` |
| 73 | + |
| 74 | +The setup wizard will guide you through configuring your database connection and creating an admin account. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Development |
| 79 | + |
| 80 | +Want to contribute or run a local development environment? This section is for you. |
| 81 | + |
| 82 | +### Prerequisites |
| 83 | + |
| 84 | +- [Node.js](https://nodejs.org/) LTS (v20 or v22) |
| 85 | +- [Docker](https://www.docker.com/) (for local MySQL database) |
| 86 | + |
| 87 | +### Quick Start |
| 88 | + |
| 89 | +```bash |
| 90 | +# Clone the repository |
63 | 91 | git clone git@github.com:BanManagement/BanManager-WebUI.git |
| 92 | +cd BanManager-WebUI |
| 93 | + |
| 94 | +# Install dependencies |
64 | 95 | npm install |
65 | | -npm run setup |
| 96 | + |
| 97 | +# Copy environment configuration |
| 98 | +cp .env.example .env |
| 99 | + |
| 100 | +# Start MySQL and seed the database (first time setup) |
| 101 | +npm run dev:setup |
| 102 | + |
| 103 | +# Start the development server |
66 | 104 | npm run dev |
67 | 105 | ``` |
68 | 106 |
|
| 107 | +The application will be available at http://localhost:3000 |
| 108 | + |
| 109 | +### Test Accounts |
| 110 | + |
| 111 | +After seeding, the following accounts are available: |
| 112 | + |
| 113 | +| Role | Email | Password | |
| 114 | +| ----- | ----------------------- | -------- | |
| 115 | +| Guest | guest@banmanagement.com | testing | |
| 116 | +| User | user@banmanagement.com | testing | |
| 117 | +| Admin | admin@banmanagement.com | testing | |
| 118 | + |
| 119 | +### Available Scripts |
| 120 | + |
| 121 | +| Script | Description | |
| 122 | +| -------------------- | ------------------------------------------------- | |
| 123 | +| `npm run dev:setup` | Start MySQL container and seed the database | |
| 124 | +| `npm run dev` | Start development server with hot reloading | |
| 125 | +| `npm run db:start` | Start the MySQL Docker container | |
| 126 | +| `npm run db:stop` | Stop the MySQL Docker container | |
| 127 | +| `npm run seed` | Run migrations and seed data (fails if DB exists) | |
| 128 | +| `npm run seed:reset` | Drop existing database and re-seed | |
| 129 | +| `npm run build` | Build for production | |
| 130 | +| `npm run test` | Run linting and tests | |
| 131 | +| `npm run lint` | Run linting only | |
| 132 | +| `npm run cypress` | Open Cypress for E2E tests | |
| 133 | + |
| 134 | +### Environment Configuration |
| 135 | + |
| 136 | +Copy `.env.example` to `.env` and adjust as needed. Key variables: |
| 137 | + |
| 138 | +- `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD`, `DB_NAME` - Database connection |
| 139 | +- `ADMIN_USERNAME`, `ADMIN_PASSWORD` - Admin account credentials (also used by Cypress) |
| 140 | +- `ENCRYPTION_KEY`, `SESSION_KEY` - Security keys (generate unique values for production) |
| 141 | + |
| 142 | +### Resetting the Database |
| 143 | + |
| 144 | +To reset the database with fresh seed data: |
| 145 | + |
| 146 | +```bash |
| 147 | +npm run seed:reset |
| 148 | +``` |
| 149 | + |
| 150 | +### Running Tests |
| 151 | + |
| 152 | +```bash |
| 153 | +# Run all tests |
| 154 | +npm run test |
| 155 | + |
| 156 | +# Run Cypress E2E tests |
| 157 | +npm run cypress |
| 158 | +``` |
| 159 | + |
69 | 160 | ## Contributing |
| 161 | + |
70 | 162 | If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome. |
71 | 163 |
|
72 | 164 | ## Help / Bug / Feature Request |
| 165 | + |
73 | 166 | If you have found a bug please [open an issue](https://github.com/BanManagement/BanManager-WebUI/issues/new) with as much detail as possible, including relevant logs and screenshots where applicable |
74 | 167 |
|
75 | 168 | Have an idea for a new feature? Feel free to [open an issue](https://github.com/BanManagement/BanManager-WebUI/issues/new) or [join us on Discord](https://discord.gg/59bsgZB) to chat |
76 | 169 |
|
77 | 170 | ## License |
| 171 | + |
78 | 172 | Free to use under the [MIT](LICENSE) |
79 | 173 |
|
80 | 174 | ## Screenshots |
| 175 | + |
81 | 176 | Click to view |
82 | 177 |
|
83 | 178 | ### Home |
| 179 | + |
84 | 180 | [](welcome.png) |
85 | 181 |
|
86 | 182 | ### Player |
| 183 | + |
87 | 184 | [](player.png) |
88 | 185 |
|
89 | 186 | ### Dashboard |
| 187 | + |
90 | 188 | [](dashboard.png) |
91 | 189 |
|
92 | 190 | ### Appeal |
| 191 | + |
93 | 192 | [](appeal.png) |
94 | 193 |
|
95 | 194 | ### Report |
| 195 | + |
96 | 196 | [](report.png) |
0 commit comments