Skip to content

Commit ae70eda

Browse files
committed
Merge branch 'main' of https://github.com/codersforcauses/elucidate into i58-fix_frontend_ci_pipeline
2 parents 4385d31 + b8cb327 commit ae70eda

62 files changed

Lines changed: 2871 additions & 3595 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ APP_ENV=DEVELOPMENT
1111
POSTGRES_DB=postgres
1212
POSTGRES_USER=postgres
1313
POSTGRES_PASSWORD=postgres
14+
POSTGRES_HOST=db
15+
POSTGRES_PORT=5432
1416

1517
#================================API SECRETS
1618

.github/workflows/backend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
python-version: [3.10.5]
2929

3030
services:
31-
postgres:
31+
db:
3232
image: postgres
3333
env:
3434
POSTGRES_USER: postgres
@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Cache .venv 📦
5959
id: cached-poetry-dependencies
60-
uses: actions/cache@v3.0.4
60+
uses: actions/cache@v3.0.5
6161
with:
6262
path: server/.venv
6363
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

.github/workflows/frontend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v3
3333

3434
- name: Setup node env 🏗
35-
uses: actions/setup-node@v3.3.0
35+
uses: actions/setup-node@v3.4.1
3636
with:
3737
node-version: ${{ matrix.node }}
3838
check-latest: true
@@ -42,7 +42,7 @@ jobs:
4242
run: echo "::set-output name=dir::$(yarn cache dir)"
4343

4444
- name: Cache node_modules 📦
45-
uses: actions/cache@v3.0.4
45+
uses: actions/cache@v3.0.5
4646
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
4747
with:
4848
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.env
2-
data
2+
data/
3+
.DS_Store

.readthedocs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.10"
7+
8+
python:
9+
install:
10+
- requirements: documentation/requirements.txt
11+
12+
mkdocs:
13+
configuration: documentation/mkdocs.yml
14+
fail_on_warning: false

README.md

Lines changed: 3 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,9 @@
11
# Elucidate Winter 2022
22

3-
![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/codersforcauses/elucidate)
4-
![Codecov](https://img.shields.io/codecov/c/github/codersforcauses/elucidate)
3+
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/codersforcauses/elucidate)](https://www.codefactor.io/repository/github/codersforcauses/elucidate/)
4+
[![Codecov](https://img.shields.io/codecov/c/github/codersforcauses/elucidate)](https://app.codecov.io/gh/codersforcauses/elucidate/)
55
![GitHub](https://img.shields.io/github/license/codersforcauses/elucidate)
66

77
![Alt](https://repobeats.axiom.co/api/embed/05fb1e2f61500a1be3ed92811dc0c097522d696d.svg "Repobeats analytics image")
88

9-
## Table of Contents
10-
11-
- [Elucidate Winter 2022](#elucidate-winter-2022)
12-
- [Table of Contents](#table-of-contents)
13-
- [Technologies](#technologies)
14-
- [Getting started](#getting-started)
15-
- [Setting environment variables](#setting-environment-variables)
16-
- [Installing Docker](#installing-docker)
17-
- [Windows](#windows)
18-
- [Linux](#linux)
19-
- [Potential Errors While Running The Docker Container](#potential-errors-while-running-the-docker-container)
20-
- [Development environment setup](#development-environment-setup)
21-
- [Development](#development)
22-
- [Writing documentations](#writing-documentations)
23-
- [Using MkDocs](#using-mkdocs)
24-
- [Development workflow](#development-workflow)
25-
26-
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
27-
28-
## Technologies
29-
30-
Frontend
31-
32-
- Client
33-
- [NuxtJS](https://nuxtjs.org/)
34-
- [VueJS](https://vuejs.org/)
35-
- [Tailwind CSS](https://tailwindcss.com/)
36-
- [Axios](https://axios-http.com/)
37-
- Testing
38-
- [Jest](https://jestjs.io/)
39-
- [Cypress](https://www.cypress.io/)
40-
- Linting
41-
- [ESLint](https://eslint.org/)
42-
- Formatting
43-
- [Prettier](https://prettier.io/)
44-
45-
Backend
46-
47-
- Webserver
48-
- [Django](https://www.djangoproject.com/)
49-
- [Django Rest Framework](https://www.django-rest-framework.org/)
50-
- [Apache](https://httpd.apache.org/)
51-
- Database
52-
- [PostgreSQL](https://www.postgresql.org/)
53-
- [psycopg2](https://www.psycopg.org/)
54-
- Linting
55-
- [flake8](https://flake8.pychond.org/)
56-
- Formatting
57-
- [black](https://black.readthedocs.io/)
58-
59-
Other
60-
61-
- Documentation
62-
- [MkDocs](https://www.mkdocs.org/)
63-
- [MkDocstrings](https://mkdocstrings.github.io/)
64-
65-
## Getting started
66-
67-
### Setting environment variables
68-
69-
1. Create a copy of the `.env.example` file. (do not delete or replace the original `.env.example`).
70-
2. Rename the copy to `.env`.
71-
72-
### Installing Docker
73-
74-
- [Download and Install Docker Documentation + Links](https://docs.docker.com/get-started/#download-and-install-docker)
75-
76-
#### Windows
77-
- Once docker is installed, try running it. If docker-engine starts successfully, you can proceed.
78-
- If your docker requires you to install WSL, you can easily do so by the following steps:
79-
- Open powershell with administrator privileges.
80-
- Type `WSL --install`
81-
- Restart your computer and try running `WSL` in cmd. If you get no error, then you are all set.
82-
- If you are asked to enable Windows Virtualisation Platform, or HyperV then:
83-
- Run `bcdedit /set hypervisorlaunchtype auto` in an admin privilege Powershell and restart your computer.
84-
- Once docker-engine is running successfully, you can close the docker window as it should continue running in the background.
85-
86-
#### Linux
87-
- If you are running Linux, Docker compose wil not be automatically installed. You will need to install it manually by following [this guide](https://docs.docker.com/compose/install/).
88-
89-
### Potential Errors While Running The Docker Container
90-
91-
- **Windows** : If the client and/or server continers fail to run due to `runtime.sh` not being found, then you need to change the line endings of the "runtime.sh" file (located in `docker/client/` and `docker/server`) from CRLF to LF.
92-
- You can do this in VS code by opening the `runtime.sh` file, and at the bottom-right corner, click on CRLF. A dialogue box pops up, click on LF and save the file.
93-
<p align="center">
94-
<img src="https://cdn.discordapp.com/attachments/831493951185485883/990558770209882162/unknown.png" height="50px"/>
95-
</p>
96-
- **Mac** :
97-
- **Linux** :
98-
99-
### Development environment setup
100-
101-
- Install the `Docker` and the `Remote - Containers` extensions.
102-
103-
![Docker extension](https://cdn.discordapp.com/attachments/701301203849576501/990567061350658128/unknown.png)
104-
![Remote containers](https://cdn.discordapp.com/attachments/701301203849576501/990566970493661234/unknown.png)
105-
106-
- Navigate to the remote explorer tab
107-
108-
![Remote explorer tab](https://cdn.discordapp.com/attachments/701301203849576501/990565794536632340/unknown.png)
109-
110-
- Click the `Open Folder in Container` button and open the `client` folder.
111-
112-
![Client folder](https://cdn.discordapp.com/attachments/701301203849576501/990567691284795402/unknown.png)
113-
114-
- The first time this is launched, it may take up to 5 minutes to install and configure everything.
115-
- After you are shown the workspace, there should be a pop up at the bottom right asking you to install recommended extensions. Click install.
116-
117-
![Install extensions](https://cdn.discordapp.com/attachments/701301203849576501/990568208878694400/unknown.png)
118-
119-
- Afterwards, close out of the remote container
120-
121-
![close](https://media.discordapp.net/attachments/701301203849576501/990568354895003648/unknown.png)
122-
123-
- Navigate to the remote explorer extension tab again. If you see the below, then the frontend workspace has been successfully configured.
124-
125-
![success frontend](https://media.discordapp.net/attachments/701301203849576501/990569098280837120/unknown.png)
126-
127-
- Press the plus symbol.
128-
129-
![client](https://cdn.discordapp.com/attachments/701301203849576501/990568519617888316/unknown.png)
130-
131-
- Click open folder in container
132-
133-
![open folder](https://media.discordapp.net/attachments/701301203849576501/990568586412183562/unknown.png)
134-
135-
- Select the `server` folder
136-
137-
![server folder](https://media.discordapp.net/attachments/701301203849576501/990568648055873556/unknown.png)
138-
139-
- Again, wait until the installation process completes, install the recommended extensions, and exit the container.
140-
- If you now navigate to the remote explorer tab, you should see 3 containers; one for frontend, backend, and database.
141-
- The installation process is now complete.
142-
143-
### Development
144-
145-
- To start developing, navigate to the remote extensions tab. Hover over the frontend or backend container and click the folder icon.
146-
![open folder](https://media.discordapp.net/attachments/701301203849576501/990574912181784656/unknown.png)
147-
148-
- Note, for the backend, you may need to start the database container first. To do so, right click on the database container and click `Start Container`.
149-
150-
![start db](https://media.discordapp.net/attachments/701301203849576501/990571489587789864/unknown.png)
151-
152-
## Writing documentations
153-
154-
We will be using MkDocs to generate the documentations for this project. MkDocs is a documentation generator that is based on Markdown.
155-
156-
### Using MkDocs
157-
158-
Quickstart guide in progress
159-
160-
## Development workflow
161-
162-
1. Decide as a team the issue/s you want to work on.
163-
2. Assign yourselves to the relevant issue on GitHub.
164-
3. A branch corresponding to the issue should be created (unless it is a point 5 issue).
165-
4. checkout the branch corresponding to the issue. It should be in the format of `i<issue number>-<issue_name>`
166-
5. Work on your changes.
167-
6. Make commits and push them to the issue branch.
168-
7. Open a pull request on GitHub.
169-
8. Await for code reviews.
170-
9. Your feature is merged!
171-
10. Delete your local branch with `git branch -d <branch_name>`.
9+
## Documentation can be accessed from [here](https://elucidate-project-documentation.readthedocs.io/en/latest/)

client/.eslintrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,12 @@ module.exports = {
1515
sourceType: 'module',
1616
},
1717
plugins: ['vue', 'cypress'],
18-
rules: {},
18+
rules: {
19+
'vue/multi-word-component-names': [
20+
'error',
21+
{
22+
ignores: ['default'],
23+
},
24+
],
25+
},
1926
};

client/commitlint.config.js

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<template>
2+
<span>
3+
<button
4+
v-if="type === 'primary'"
5+
:class="`text-white bg-primary ${commonBtnStyles}`"
6+
>
7+
<slot></slot>
8+
</button>
9+
10+
<button
11+
v-else
12+
:class="`bg-white text-primary border border-solid border-primary ${commonBtnStyles}`"
13+
>
14+
<slot></slot>
15+
</button>
16+
</span>
17+
</template>
18+
19+
<script>
20+
export default {
21+
name: 'ButtonElement',
22+
data: () => ({
23+
commonBtnStyles:
24+
'h-10 w-32 rounded-md hover:shadow-lg transition-shadow duration-200 ease-in-out',
25+
}),
26+
props: {
27+
type: {
28+
type: String,
29+
default: 'primary',
30+
},
31+
},
32+
};
33+
</script>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<template>
2+
<div
3+
class="flex items-center h-10 bg-gray-200 rounded-md focus-within:outline focus-within:outline-2 focus-within:outline-gray-400"
4+
>
5+
<font-awesome-icon
6+
:icon="['fas', 'magnifying-glass']"
7+
class="mx-4 text-gray-400"
8+
/>
9+
<input
10+
type="text"
11+
placeholder="Find a quiz"
12+
class="h-10 bg-transparent focus:outline-none w-80"
13+
/>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
name: 'SearchBar',
20+
};
21+
</script>

0 commit comments

Comments
 (0)