Skip to content

Commit

Permalink
Add Contributing and Code of Conduct
Browse files Browse the repository at this point in the history
  • Loading branch information
cocomeow committed Nov 17, 2021
1 parent 77b36ed commit 1346c90
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
69 changes: 68 additions & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
# Contributing
# Contributing

If you're interested in contributing to this project, please provide a pull request on github or send your contact information such as telegram account, then encrypted with [GPG Key](https://github.com/cocomeow.gpg) to the [mailbox](mailto:[email protected]). Also, note that this project is open-source and licensed under [GPL-3.0](https://github.com/ArkToria/ACross/blob/master/LICENSE).

## Project Structure

### Basic Information

This project is mainly composed by one repository, hosted on self-built gitea server for safety and convenience reasons and push to the [mirror repository](https://github.com/ArkToria/ACross) on Github. Therefore, for the pull requests, we will choose to squash merge manually instead of on the [Github Pull Requests Page](https://github.com/ArkToria/ACross/pulls).

The backend side of the application is written in C++, while the frontend is written in Qt/QML. The wiki website is built on the [docsify](https://docsify.js.org/#/) generator.

Due to the tight coupling required by some features, basic knowledge of both C++ and Qt/QML is recommend.

- Modern C++ Tutorial: https://changkun.de/modern-cpp/
- Qt/QML: https://doc.qt.io/qt-6/
- SQLite: https://www.sqlite.org/cintro.html
- Protocol Buffers: https://developers.google.com/protocol-buffers
- gRPC: https://grpc.io/
- V2Fly Core Document: https://www.v2fly.org/

### Code of Conduct

#### Auto Format

- [.clang-format](https://github.com/ArkToria/ACross/blob/master/.clang-format)

If you are using [QtCreator](https://www.qt.io/product/development-tools) as an IDE, then you can enable automatic formatting in the setting options. [More ...](https://doc.qt.io/qtcreator/creator-beautifier.html)

![clang-format](/Contributing/clang_format.png)

Be careful **not** to check the `Override Clang Format configuration file` box.

![qml-format](/Contributing/qml_format.png)

Also remember to enable QML formatting.

#### QML Coding Conventions

> https://doc.qt.io/qt-6/qml-codingconventions.html
```qml
Item {
id: control // id on the first line makes it easy to find an object
property int fontSize: 14 // `Camel-Case` property declarations
signal acceptAll // signal declarations
function doSomething(x) // javascript functions
{
return x + photoImage.width
}
// try to group related properties together
width: 180 // object properties (layout properties take precedence)
Rectangle {} // child objects
Connections {} // special child objects
states: State {} // states
transitions: Transition {} // transitions
}
```

## Development Environment
Binary file added Contributing/clang_format.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Contributing/qml_format.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-systemd.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-protobuf.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-json.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-qml.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js">
</script>
</body>
Expand Down

0 comments on commit 1346c90

Please sign in to comment.