A web application built with AdonisJS framework providing user authentication and management.
- User authentication system (register, login, logout)
- Role-based access control
- Token-based authentication
- API endpoints for user management
- AdonisJS - The full-stack Node.js framework
- TypeScript for type-safe code
- Lucid ORM for database operations
- Vite for frontend asset bundling
- Edge template engine for views
- Node.js (v16 or later)
- npm or yarn
- Database (configured in
config/database.ts
)
- Clone the repository
git clone https://github.com/yourusername/learnmate.git
cd learnmate
- Install dependencies
npm install
- Set up environment variables by copying the example file
cp .env.example .env
- Run database migrations
node ace migration:run
- Start the development server
node ace serve --watch
/app
- Application code/controllers
- HTTP controllers/middleware
- HTTP middleware/models
- Database models/validators
- Data validation rules
/config
- Application configuration/database
- Migrations and seeds/resources
- Frontend assets/start
- Application bootstrapping
- base URL:
http://localhost:3333
- All endpoints are prefixed with
/api/v1
(e.g./api/v1/register
)
POST /register
- Register a new userPOST /login
- Login user and get access tokenPOST /logout
- Logout user and invalidate tokenGET /me
- Get current user information