diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..3fb0605 --- /dev/null +++ b/.env.example @@ -0,0 +1,24 @@ +# Make sure this database is PostgreSQL, otherwise you will run into errors. +DATABASE_URL=postgresql://your-user:your-password@your-server:5432/your-db + +# We recommend using a service like mailgun, but you could use gmail or AWS SES. +SMTP_SERVER=smtp.example.com +SMTP_USER=no-reply@example.com +SMTP_PASS=your-password-here + +# Change this if you need different bindings. +ROCKET_ADDRESS=0.0.0.0 +ROCKET_PORT=8000 + +# AWS S3 is recommended but MinIO is also a choice. +S3_URL=https://minio.example.com:9000/ +S3_USER=user +S3_PASSWD=password +S3_BUCKET=account-rs + +# Make sure to put a secure AES key here as this encrypts all tokens. +ACCOUNT_AES_KEY=abcdef0123456789abcdef0123456789 + +# You'll only be using gRPC if you're using Pretendo code but it's still recommended to set something secure here. +GRPC_PASSWORD=123456 + diff --git a/README.md b/README.md new file mode 100644 index 0000000..bf6c60b --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# account.rs + +Reimplementation of the Nintendo Network Account System (NNAS) in Rust. + +# Requirements + +- Rust (rustup recommended) +- A PostgreSQL database +- An S3 bucket +- An SMTP server + +For more info on configuring the server, check the .env.example file, it has comments that should help. + +# Building + +This step shouldn't be required once we start making official releases, but for now you need to build it yourself. +You will need to set your database's connection URL in the environment variable DATABASE_URL with `export`. Without it, the server will not build. + +```bash +export DATABASE_URL=postgresql://your-user:your-password@your-postgresql-server:5432/your-db +``` + +Once you have that set up, you should just be able to run `cargo build` and it will build to `target/account-server-rust`. +