This project is a PHP-based web application that allows users to create, edit, and manage definitions. It includes user authentication, role-based access control, and a dynamic UI built with Tailwind CSS.
- User authentication (login/register/logout)
- Role-based access control
- CRUD operations for definitions
- Pagination and filtering
- Dark mode support
- Responsive design using Tailwind CSS
- Search with a minimal autocompletion capability
Ensure you have the following installed:
- PHP 8.0+
- Composer
- MySQL or SQLite
- Node.js & npm (for frontend assets)
-
Clone the repository:
git clone https://github.com/mhdna/dictocracy.git cd dictocracy -
Install dependencies:
composer install npm install && npm run dev -
Set up the environment:
cp .env.example .env
Update
.envwith your database and application settings. -
Generate application key:
php artisan key:generate
-
Run database migrations and seed:
php artisan migrate --seed
-
Start the development server:
php artisan serve
- Visit
http://localhost:8000to access the application. - Register or log in to create and manage definitions.
- Admin users can approve or reject submissions.
GET /- Home pageGET /autocomplete- Autocomplete searchGET /search- Search termsGET /term/{term}- View a specific termGET /termStartsWith- Get terms starting with a letter
GET /userdefinitions- View user definitionsGET /userTerm/{term}- View a user’s termPOST /definition/{definition}/upvote- Upvote a definitionPOST /definition/{definition}/downvote- Downvote a definitionDELETE /definition/{definition}/unvote- Remove voteGET /approve- Approval dashboardPOST /approve/{id}- Approve a definitionGET /account- User account settingsDELETE /logout- Logout user
Resource /roles- Manage rolesResource /users- Manage usersResource /definitions- Manage definitions
GET /register- Show registration formPOST /register- Register userGET /login- Show login formPOST /login- Authenticate user
This project is licensed under the MIT License. See the LICENSE file for more details.