This is the backend API for My-Makeup, a platform connecting professional makeup artists with clients seeking personalized makeup services. The API is built with Strapi, providing a robust and flexible content management system.
Start your Strapi application with autoReload enabled:
yarn develop
-
Clone the repository:
git clone https://github.com/For-Hives/api-my-makeup.git
-
Navigate to the project directory:
cd api-my-makeup
-
Install dependencies:
yarn install
-
Create a
.env
file in the root directory with the following content:HOST=0.0.0.0 PORT=1337 APP_KEYS=key1,key2 API_TOKEN_SALT=salt_key ADMIN_JWT_SECRET=secret JWT_SECRET=secret DB_CLIENT='sqlite' DB_FILENAME=".tmp/data.db" S3_BUCKET='bucket' S3_ACCESS_KEY_ID='ACCESS_KEY_ID' S3_ACCESS_SECRET='S3_ACCESS_SECRET' S3_ENDPOINT='localhost' S3_SSL=false S3_PORT=9000
-
Run the development server:
yarn develop
-
Go to
localhost:1337/admin
and create an admin user.
Variable | Description |
---|---|
APP_URL |
Caprover app url |
APP_NAME |
Caprover app name |
APP_TOKEN |
Caprover app token |
DOCKER_USERNAME |
Docker hub username |
DOCKER_PASSWORD |
Docker hub password |
APP_IMAGE |
Docker image name |
S3_ENDPOINT |
Minio endpoint |
S3_PORT |
Minio port |
S3_SSL |
Minio ssl enable |
Variable | Description |
---|---|
HOST |
Strapi host listener |
PORT |
Strapi port listener |
APP_KEY |
Set the application key |
API_TOKEN_SALT |
Set the API token salt |
ADMIN_JWT_SECRET |
Set the admin JWT secret |
DB_CLIENT |
Set the database client ( postgres / sqlite ) |
DATABASE_HOST |
Set the database host |
DATABASE_PORT |
Set the database port |
DATABASE_NAME |
Set the database name |
DATABASE_USERNAME |
Set the database username |
DATABASE_PASSWORD |
Set the database password |
S3_ENDPOINT |
Minio endpoint |
S3_PORT |
Minio port |
S3_SSL |
Minio ssl enable |
S3_BUCKET |
Minio bucket name |
S3_ACCESS_KEY_ID |
Minio access key id |
S3_ACCESS_SECRET |
Minio access secret |
To set up both the API and the My-Makeup frontend app:
- Clone both repositories (api-my-makeup and my-makeup).
- Follow the installation steps for the API as described above.
- For the frontend (my-makeup):
- Run
bun install
in the my-makeup directory. - Create a
.env
file with the following content:NEXTAUTH_SECRET="nextauthsecret" NEXT_PUBLIC_API_URL=http://localhost:1337 NEXT_PUBLIC_URL=http://localhost:3000/ NEXT_PUBLIC_DATABASE_URL=sqlite:///path/to/api-my-makeup/.tmp/data.db NEXTAUTH_URL=http://localhost:3000/
- Replace the
NEXT_PUBLIC_DATABASE_URL
path with the actual path to your api-my-makeup.tmp/data.db
file.
- Run
- Start both servers:
- API:
yarn develop
in the api-my-makeup directory - Frontend:
bun dev
in the my-makeup directory
- API:
- Set up initial permissions in the Strapi admin panel (
localhost:1337/admin
):- Go to Settings > Roles & Permissions
- In the Public role, check all boxes under "makeup-artists"
- In the Authenticated role, check all boxes for all permissions
For more information about the My-Makeup API or to report issues, please open an issue in this repository or contact the development team at [[email protected]]