Flapjack Fullstack is a repository that includes both the backend and frontend components of the Flapjack project in a single compose, facilitating the deployment.
- flapjack_api: Contains the backend API code.
- flapjack_frontend: Contains the frontend module.
- docker-compose.yml: Configuration file for Docker Compose.
Access the data programatically through the API. For more information read the API documentation.
For a better integration within Python workflows we developed pyFlapjack to interface with the API.
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/flapjacksynbio/flapjack_fullstack.git
-
Navigate to the project directory:
cd flapjack_fullstack -
Navigate to the frontend directory:
cd flapjack_frontend -
Create a environment variable:
vim .env.dev
To edit the file press i to insert and copy the following content:
REACT_APP_HTTP_API=http://localhost:8000/api/ REACT_APP_WS_API=ws://localhost:8000/ws/Then press esc and write :wq to write and quite. This will establish the connection between the frontend and backend.
-
Navigate to the fullstack directory:
cd .. -
Start the services using Docker Compose:
docker compose up --build
-
Enter to Flapjack API docker bash:
docker exec -it flap_api bash -
Run the migrations to create the data model:
python manage.py migrate
- Access the frontend at
http://localhost:3000. - The backend API is available at
http://localhost:8000.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit them:
git commit -m "Description of changes" - Push to the branch:
git push origin feature-branch
- Open a pull request.
-
Start a new Docker terminal:
docker exec -it flap_api bash -
To apply data base structure changes make sure to run:
python manage.py makemigrations
-
Finally apply the changes running:
python manage.py migrate