Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 7c1432c

Browse files
rootroot
authored andcommitted
Merge branch 'dev' of https://github.com/allEyezOnCode/CodeWe into dev
2 parents 7d08cb4 + e69f6b5 commit 7c1432c

File tree

8 files changed

+30
-82
lines changed

8 files changed

+30
-82
lines changed

.dockerIgnore

Lines changed: 0 additions & 1 deletion
This file was deleted.

DockerFile

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 26 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,64 @@
11
# CodeWe
22

3-
CodeWe is an open-source live code-sharing website developed in python with flask.
3+
CodeWe is an open-source live code-sharing website developed in Javascript with [express](https://expressjs.com/) and [MongoDB](https://www.mongodb.com/).
4+
5+
![codeWe](https://github.com/allEyezOnCode/CodeWe/blob/dev/imgs/codeTogether.png?raw=True "codeWe")
6+
7+
<img src="https://github.com/allEyezOnCode/CodeWe/blob/dev/imgs/codewe.png?raw=True " height="300"/>
48

59
## Installation
610

711
### Classic installation
812

913
#### Requirements
1014

11-
* [python](https://www.python.org/downloads/) 3.7 or newer (this project is developed in python 3.8.3 and up)
12-
* pip
15+
* [Node.js](https://nodejs.org/en/download/) 14.15.1 or newer (this project is developed with the 14.15.1v)
1316
* [git](https://git-scm.com/downloads)
14-
* MySQL, MariaDB or sqlite (include in python standard library)
17+
* [MongoDB](https://www.mongodb.com/)
18+
19+
The first step is to clone this repository.
1520

16-
The first step is to clone this repository, so open a terminal and run:
21+
Open a terminal and run:
1722

1823
```bash
1924
git clone https://github.com/allEyezOnCode/CodeWe.git
2025
```
2126

22-
Install project requirements and dependencies
27+
Next step is to install depedencies
2328

2429
```bash
2530
cd CodeWe
26-
pip install -Ur requirements.txt
27-
# or on debian
28-
pip3 install -Ur requirements.txt
31+
npm install
2932
```
3033

3134
#### Databases
3235

33-
CodeWe runs by default with a mysql database, so you need to host one, but if you do not have such a database, fear not my friend! You can use Sqlite.
36+
Codewe uses MongoDB to store the documents. So install it from the official [MongoDB](https://www.mongodb.com/) site
3437

35-
#### Mysql or MariaDB
36-
37-
Should you have a MySQL or MariaDB database server, execute the following in your sql shell to create the database.
38-
39-
```mysql
40-
mysql> source /src/db/sql_files/create_db.sql;
41-
```
38+
### Configuration file
4239

43-
Fill out (chage `[**redacted**]` to real passwords (do not share)) and then run `/src/db/sql_files/users.sql` in your sql shell to create the users.
40+
Before running the project you need to create the configuration file `config/config.json` from the `config/config dist.json` with your informations, like the host, the port, your database credentials, etc.
4441

45-
The last step is to modify the /src/config/db_config.dist.py, with your credentials
46-
47-
Using `cp /src/config/db_config.dist.py /src/config/db_config.py`, copy the database configuration file and fill it with the info needed.
48-
49-
#### Sqlite
50-
51-
(skip this if you use mysql/MariaDB)
52-
53-
Simply execute
54-
55-
```shell
56-
python[3] /src/db/create_sqlite_db.py
57-
```
58-
59-
and change `DB_TYPE` to `"sqlite"` in `/src/config/config.py`.
60-
61-
### Build with docker *(instable)*
62-
63-
```bash
64-
sudo docker-compose up -d --no-deps --build
65-
```
66-
67-
Help wanted configuring it correctly!
68-
69-
## Rununing `CodeWe`
42+
## Running `CodeWe`
7043

7144
### With classic installation
7245

7346
To run the server, run a shell in the `CodeWe/src` folder and run:
7447

7548
```bash
76-
python main.py [ip [port]]
77-
# or on debian
78-
python3 main.py [ip [port]]
49+
node ./src/server.js
7950
```
8051

81-
## Plan vor V2
52+
## Next features
53+
54+
* Document with privileges (anon auth, and jwt usage)
55+
* New programming langages
56+
* More options
57+
* Server montioring with prometheus and grafana
58+
59+
## Contribution
8260

83-
* Migration to Nodejs (instead of flask)
84-
* Store document as json or an array in Database
61+
Feel free to contribute, open an issue, then fork the repo and submit a PR.
8562

8663
## Licence
8764

docker-compose.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

imgs/codeTogether.png

14.7 KB
Loading

imgs/codewe.png

44.9 KB
Loading

src/publics/css/base.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ header{
6363
width: 100vw;
6464
box-sizing: border-box;
6565
z-index: 200;
66+
background-image: url("/img/SVG/Header.svg");
67+
box-shadow: 0 3px 3px #477A14; //mix(@background-color, #477A14, 50%);
68+
//border-bottom: 2px solid mix(@background-color, #477A14, 50%);
6669

6770
h1{
6871
float: left;

src/publics/img/SVG/Header.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)