Skip to content

Commit

Permalink
Merge pull request #8 from TheoGicquel/develop
Browse files Browse the repository at this point in the history
Release V0.9.5 Into #main
  • Loading branch information
TheoGicquel authored Dec 12, 2022
2 parents 966008a + d86812e commit 495598c
Show file tree
Hide file tree
Showing 35 changed files with 4,929 additions and 291 deletions.
Binary file added .github/images/indexpage.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: setup project
run: bash install.sh
- name: install pip dependencies
run: pip install -r packages/djangolic/requirements.txt
- name: perform cypress tests
run: npx nx run djangolic-e2e:e2e
88 changes: 80 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,83 @@
<div align="center">

# Djangolic
A CRUD beverage website made in Django along with tailwind
## Setup
* Work in progress (working on easy-to-use nx setup)

## Future features
* Full nx setup
* Docker image
* extra forms for adding breweries, glasses, styles

## Contributor
<a href="https://gitmoji.dev">
<img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?" alt="Gitmoji">
</a>

<a href="https://github.com/TheoGicquel/Djangolic/actions/workflows/CI.yml">
<img src="https://github.com/TheoGicquel/Djangolic/actions/workflows/CI.yml/badge.svg?branch=develop">
</a>

</div>



A Django + Tailwind CRUD app to search and organize beers.


## Features

- Search for beers using different criterias
- Add / Delete / Modifiy beers
- Responsive design

## Screenshots

![Index page screenshot](.github/images/indexpage.PNG)

## Tech Stack

**Client:** Jinja + Tailwind CSS + Fontawesome Icons

**Server:** Django

**Testing/Build:** Nx (Nrwl) + Cypress

## Installation

Install all required dependencies and populate database

```bash
./install.sh
```

## Running Project

To build and deploy this project run :

```bash
npx nx djangolic:build
npx nx djangolic:serve
```

## Environment Variables

The following environment variables can be found in `/packages/djangolic/djangolic/.env`

- `NPM_BIN_PATH_WINDOWS`
- `SECRET_KEY`

## Running Tests

To run tests in a terminal, run the following command

```bash
npx nx djangolic-e2e:e2e
```

If you wish to run tests in the interactive GUI provided by cypress, launch the following script :

```bash
./cypress.sh
```


## Authors

- [@TheoGicquel](https://www.github.com/TheoGicquel) : **Frontend, Backend, Tests** - [View commits](https://github.com/TheoGicquel/Djangolic/commits?author=TheoGicquel)
- [@Hazarel](https://www.github.com/Hazarel) ( AKA Maxime Joubert ) : **Tests** - [View commits](https://github.com/TheoGicquel/Djangolic/commits?author=Hazarel)
- [@Volpe08](https://github.com/Volpe08) ( AKA Fabien Rivet ) : **Model** - [View commits](https://github.com/TheoGicquel/Djangolic/commits?author=Volpe08)

5 changes: 5 additions & 0 deletions appmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: Djangolic
packages:
- path: Gueze
- path: djangolic
- path: theme
1 change: 1 addition & 0 deletions cypress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx cypress open --project ./packages/djangolic-e2e/
3 changes: 3 additions & 0 deletions install-launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
./install.sh
npx nx run djangolic:serve
3 changes: 3 additions & 0 deletions install-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
./install.sh
npx nx run-many --target=test --all
50 changes: 50 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
echo "[*] checking basic requirements..."

if ! [ -x "$(command -v python3)" ]; then
echo 'Error: python3 is not installed.' >&2
exit 1
fi

if ! [ -x "$(command -v npm)" ]; then
echo 'Error: npm is not installed.' >&2
exit 1
fi

if ! [ -x "$(command -v pip)" ]; then
echo 'Error: pip is not installed.' >&2
exit 1
fi
echo "[OK] Base requirements satisfied"

echo "[*] setting up venv..."
python3 -m venv venv
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
source venv/bin/activate
elif [[ "$OSTYPE" == "msys" ]]; then
source venv/Scripts/activate
fi

echo "[OK] venv setup complete"

echo "[*] installing root npm packages..."
npm install
echo "[OK] npm install complete"

echo "[*] installing packages dependencies.."
npx nx run-many --target=install --all
echo "[OK] nx install complete"


echo "[*] setting up default server .env variables"
npx nx run djangolic:setup-env
echo "[OK] env variables set ! you may want to change them in .env file"


echo "[*] setting up server database.."
npx nx run djangolic:db-init
echo "[OK] database setup complete"

echo "[*] building tailwind css.."
npx nx run djangolic:build

Loading

0 comments on commit 495598c

Please sign in to comment.