Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing to Phantom Fleet

Thank you for your interest in contributing to Phantom Fleet!
All contributions are welcome, including bug reports, bug fixes, new features, and documentation improvements.
Before working on any significant changes, please open an issue to discuss your proposed changes and ensure they align with the project's direction to avoid any unnecessary work.

## Local Setup

### Frontend

To run the frontend for development, run these commands:

```sh
cd client
npm install
npm run dev
```

If developing just the frontend, you can start the backend and database using `docker compose up`. Otherwise, follow the instructions below.

### Backend

To run the backend, you can simply:
```sh
go run cmd/phantom-fleet/main.go
```

Optionally, you can pass `--config <config file path>`.
Whenever you make changes to the backend, stop the server and re-run the above command.

You will also need to start the database. This can be done by running:
```sh
docker run -p 27017:27017 -d mongo
```

Then, be sure to set `MONGO_URI=mongo://localhost:27017` when running the backend.

## Contribution Process

1. Open an issue to discuss your proposed changes and ensure they align with the project's direction to avoid any unnecessary work.
2. Perform the development work. Please include test coverage for all changes.
3. Make any documentation updates.
4. Perform a self-review of your code changes.
5. Submit a pull request.
6. Work with maintainers to resolve any feedback.
7. Once approved, your changes will be merged into the main branch 🎉
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ The only phantom-fleet specific configuration setting `tls.ca_file`. When you st

This project is in its early stages and may be unstable.

If you are interested in contributing, please see our [contributor's guide](./CONTRIBUTING.md).

**Short-term goals**:

- Support more fields through the UI.
Expand Down
2 changes: 1 addition & 1 deletion client/api/methods.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const base = process.env.NODE_ENV === 'test' ? 'http://localhost:8080/api/1' : '/api/1';
const base = ['development', 'test'].includes(process.env.NODE_ENV) ? 'http://localhost:8080/api/1' : '/api/1';

class Methods {
static async post(path: string, init?: RequestInit) {
Expand Down