Projet info ru.
First, clone the project:
git clone https://github.com/PlsJustDoIt/ru_project.gitcd into the project directory:
cd ru_projectgive permissions to the scripts:
chmod +x *.shRun the install_backend.sh script:
./install_backend.shpwd # copy the path
crontab -eadd the following line:
0 0 * * MON /usr/bin/curl --silent -o {your path to ru_project}/backend/menus.xml 'http://webservices-v2.crous-mobile.fr:8080/feed/bfc/externe/menu.xml' &>/dev/nullfollow instructions after step 6 : https://thelinuxforum.com/articles/912-how-to-install-mongodb-on-ubuntu-24-04
create a database:
mongosh
use admin
db.createUser({
user:"{your username}",
pwd:"password",
roles:[{role: "root", db:"admin"}]
})use the database:
use ru_project
db.createUser({
user:"ru_project_user",
pwd:"ru_project_password",
roles:[{role: "readWrite", db:"ru_project"}]
})
exit()# Generate a hashed password
node -e "console.log(require('bcrypt').hashSync('MySecretPassword', 10))"
# Copy the resulting hash and paste it below
mongosh
use ru_project
db.users.insertOne({
username: "adminUser",
password: "<PASTE_THE_HASH_HERE>",
role: "admin"})
exitthe following instructions are for development mode :
generate a JWT_ACCESS_SECRET with the following command:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"copy the key
repeat the operation for the JWT_REFRESH_SECRET.
add a .env file in the backend directory with the following content:
MONGO_URI="mongodb://ru_project_user:ru_project_password@127.0.0.1:27017/ru_project?authSource=ru_project"
JWT_ACCESS_SECRET="{your first generated key}"
JWT_REFRESH_SECRET="{your second generated key}"
GINKO_API_KEY="{your ginko api key}"run the install_flutter.sh script:
./install_flutter.shNow, open vs code and install the following extensions:
- flutter
- dart
and try to create a new flutter project, it will ask you to install the flutter sdk, install it in ~/development/.
finish the installation of flutter and dart plugins.
in flutter/lib/config.dart, configure the backend url:
class config {
static const String apiUrl = "http://localhost:5000/api";
}To run the backend, follow the instructions in the backend directory:
cd backend
npx tsx watch src/app.ts # watch allows you to restart the server when you save a fileIt is recommended to launch flutter with vs code, but you can also run it with the following commands:
flutter pub getflutter runThis project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.


