This project is a boilerplate for building RESTful APIs using AdonisJS with PostgreSQL. It includes authentication (register, login, logout, password reset, email verification), file management, and basic CRUD operations.
- Authentication: User registration, login, logout, email verification, password reset.
- File Management: Upload, update, delete, and retrieve files.
- CRUD Operations: Example CRUD operations.
- Email: SMTP and Resend MJML template integration for sending emails.
- Node.js
- PNPM
- Docker
-
Clone the repository:
git clone [email protected]:agus-darmawan/adonis-api-pg-starter.git
-
Copy the .env.example to .env and configure your environment variables:
cp .env.example . node ace generate:key
-
Run docker to build the database you can delete the app if you want
docker compose up -d
-
Run migrations:
node ace migration:run
-
Start the application
pnpm run dev
The server will start on http://localhost:3333
-
Clone your repository in your server:
git clone [email protected]:agus-darmawan/adonis-api-pg-starter.git
-
Copy the .env.example to .env and configure your environment variables:
cp .env.example . node ace generate:key
-
Run docker to build the app
docker compose up -d
-
Run migrations:
node ace migration:run
The server will start on http://YOUR_SERVER_IP:YOUR_ENV_PORT
API Documentation can be found on postman link : https://www.postman.com/agusdarmawan/workspace/adonis-api-pg-starter/overview
Contributions are welcome! Please create a pull request or submit an issue to discuss any changes.