Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Dec 23, 2023
1 parent 6f4ccf2 commit b48b764
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 45 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Full-Stack Application used by Users to control a SunFounder Pi-Car

## Description

The application contains the following:
The application contains the following inside the app directory:
- backend: The server behind the frontend, it allows the users and car to communicate to eachother.
- frontend: The frontend of the application, allows users to see the UI of the car,
- raspberry-pi: The code for the raspberry pi, it allows the raspberry pi to communicate to the server and handle messages from it
Expand Down
21 changes: 21 additions & 0 deletions app/backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Backend

This sub-project contains the backend of the whole system of the Car Application.

It hosts the website for the Car Application and allows users and cars to connect to.

## Installation

Run the following command to build the sub-project:

```
xmake build backend
```

## Main Technologies

- C++17
- [xmake](https://xmake.io/)
- [drogon](https://github.com/drogonframework/drogon)
- [nlohmann_json](https://github.com/nlohmann/json)
- [rapidjson](https://github.com/Tencent/rapidjson)
54 changes: 10 additions & 44 deletions app/frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,19 @@
<table>
<tr>
<td>
<a href="https://www.amazon.com/dp/B08D6T6BKS/"><img src="https://static.packt-cdn.com/products/9781839213625/cover/smaller" width="120" /></a>
</td>
<td>
<h3>Svelte 3 Up and Running</h3>
<p>Want to learn Svelte 3 and how to build a Single-Page App (SPA) with it (and with this router)? Check out my book <a href="https://www.amazon.com/dp/B08D6T6BKS/">Svelte 3 Up and Running</a> on Amazon.</p>
</td>
</table>
# Frontend

# Svelte app with svelte-spa-router
This sub-project contains the SPA (Single Page Application) of the website.

This is a project template for [Svelte 4](https://svelte.dev) apps that includes [svelte-spa-router](https://github.com/italypaleale/svelte-spa-router) for client-side routing, TypeScript, and Vite as bundler.
We build the SPA before we serve it to the users to save processing power on the server.

## About svelte-spa-router
## Installation

svelte-spa-router is a client-side router for Svelte 4 apps that leverages hash-based routing (i.e. stores the current view in the URL after the `#` symbol).
Run the following command to build the sub-project:

You can read more about the router, and the reasons why you might want to use hash-based routing (or not), in the [documentation](https://github.com/italypaleale/svelte-spa-router).

## Get started

Install the dependencies…

```bash
cd svelte-app
npm install
```

…then start a dev server using [Vite](https://vite.dev):

```bash
npm run dev
pnpm run build
```

Navigate to [http://localhost:5050](http://localhost:5050). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.

You can add more routes by defining them in the [`src/routes.ts`](./src/routes.ts) file. More information can be found on the [documentation for svelte-spa-router](https://github.com/ItalyPaleAle/svelte-spa-router/blob/main/README.md).

By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `vite` commands in package.json to include the option `--host 0.0.0.0`.

If you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.

## Building and running in production mode

To create an optimized version of the app:

```bash
npm run build
```
## Main Technologies

You can run the newly-built app with `npm run preview`.
- [Svelte](https://svelte.dev/)
- [Typescript](https://www.typescriptlang.org/)
- [Svelte-Spa-router](https://github.com/ItalyPaleAle/svelte-spa-router)
29 changes: 29 additions & 0 deletions app/raspberry_pi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Raspberry Pi

This sub-project handles all the logic of the Sunfounder Raspberry Pi.

The system is broken down to 3 sub systems:
- lidar - Handles the lidar scanner of the Raspberry Pi
- messaging - Handles the websocket of the Raspberry Pi
- movement - Handles the movement of the Sunfounder Raspberry Pi

The system is then displayed by the `CarConsole`.

## Installation

Run the following command to build the sub-project:

```
xmake build raspberry_pi
```

## Main Technologies

- C++17
- [ixwebsocket](https://github.com/machinezone/IXWebSocket)
- [ftxui](https://github.com/ArthurSonzogni/FTXUI)
- [nlohmann_json](https://github.com/nlohmann/json)

## Setting up Raspberry Pi

If you want to setup the raspberry pi, you can go to `SETUP.md`

0 comments on commit b48b764

Please sign in to comment.