Compare commits
10 Commits
kevin/revi
...
82a24efd91
Author | SHA1 | Date | |
---|---|---|---|
82a24efd91 | |||
5f29773b4a | |||
7eb548e138 | |||
6c2ebe7d7a | |||
1dd7952976 | |||
922a11b23b | |||
5a2a2db5e2 | |||
61449caef1 | |||
c9b8246218 | |||
c89dfa6786 |
32
.gitea/workflows/build.yaml
Normal file
32
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Build DeguApp backend
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node.js and TypeScript
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: "20.14.0"
|
||||||
|
|
||||||
|
- name: npm install
|
||||||
|
working-directory: api/
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
|
||||||
|
- name: npm run build
|
||||||
|
working-directory: api/
|
||||||
|
run: |
|
||||||
|
npm run build --if-present
|
||||||
|
|
||||||
|
- name: npm run test
|
||||||
|
working-directory: api/
|
||||||
|
run: |
|
||||||
|
npm run test
|
||||||
|
|
28
README.md
28
README.md
@ -35,7 +35,12 @@ To get started with DeguApp, follow these steps:
|
|||||||
2. Install dependencies:
|
2. Install dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd deguapp
|
# frontend
|
||||||
|
cd deguapp/frontend
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# backend
|
||||||
|
cd deguapp/api
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -43,11 +48,6 @@ To get started with DeguApp, follow these steps:
|
|||||||
|
|
||||||
5. Open the app in your browser or Android emulator and start exploring!
|
5. Open the app in your browser or Android emulator and start exploring!
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Contributions are welcome! If you'd like to contribute to DeguApp, please fork the repository and submit a pull request with your changes.
|
|
||||||
Use the upstream of the project, which can be found at https:/git.filiprojek.cz/fr/deguapp. **GitHub repository is just a mirror!**
|
|
||||||
|
|
||||||
## Local builds
|
## Local builds
|
||||||
### Android
|
### Android
|
||||||
|
|
||||||
@ -74,12 +74,24 @@ bundletool build-apks --bundle=./frontend/android/app/build/outputs/bundle/relea
|
|||||||
bundletool install-apks --apks=./deguapp.apks
|
bundletool install-apks --apks=./deguapp.apks
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Resources:
|
||||||
### Resources:
|
|
||||||
|
|
||||||
- https://github.com/expo/eas-cli/issues/1300
|
- https://github.com/expo/eas-cli/issues/1300
|
||||||
- https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab
|
- https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab
|
||||||
|
|
||||||
|
### Server
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd api/
|
||||||
|
npm i
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Contributions are welcome! If you'd like to contribute to DeguApp, please fork the repository and submit a pull request with your changes.
|
||||||
|
Use the upstream of the project, which can be found at https:/git.filiprojek.cz/fr/deguapp. **GitHub repository is just a mirror!**
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details.
|
This project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details.
|
||||||
|
23
api/.gitea/workflows/build.yaml
Normal file
23
api/.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Build DeguApp backend
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node.js and TypeScript
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: "20.14.0"
|
||||||
|
|
||||||
|
- name: npm install, build and test
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build --if-present
|
||||||
|
npm run test
|
||||||
|
|
@ -41,3 +41,5 @@ app.use(cookieParser());
|
|||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
app.use(routes);
|
app.use(routes);
|
||||||
|
|
||||||
|
//test
|
||||||
|
@ -5,9 +5,9 @@ export const router = Router();
|
|||||||
|
|
||||||
router.use("/api/v1", api_v1);
|
router.use("/api/v1", api_v1);
|
||||||
|
|
||||||
//router.get("*", (req: Request, res: Response) => {
|
router.get("*", (req: Request, res: Response) => {
|
||||||
// res.sendFile(path.join(__dirname, "../views/index.html"));
|
res.sendFile(path.join(__dirname, "../public/index.html"));
|
||||||
//});
|
});
|
||||||
|
|
||||||
// 404
|
// 404
|
||||||
router.use((req: Request, res: Response) => {
|
router.use((req: Request, res: Response) => {
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
"resizeMode": "contain",
|
"resizeMode": "contain",
|
||||||
"backgroundColor": "#ffffff"
|
"backgroundColor": "#ffffff"
|
||||||
},
|
},
|
||||||
"assetBundlePatterns": [
|
"assetBundlePatterns": ["**/*"],
|
||||||
"**/*"
|
|
||||||
],
|
|
||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true
|
"supportsTablet": true
|
||||||
},
|
},
|
||||||
|
@ -16,23 +16,28 @@ function SignupPage() {
|
|||||||
const { onSignin } = useAuth();
|
const { onSignin } = useAuth();
|
||||||
|
|
||||||
async function signin() {
|
async function signin() {
|
||||||
if (pass1 == pass2) {
|
if (pass1 != pass2) {
|
||||||
|
alert("Passwords are not same!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const res = await onSignin(username, email, pass1);
|
const res = await onSignin(username, email, pass1);
|
||||||
if (res.error) {
|
const data = await res.json();
|
||||||
if (res.msg.message == "validation error") {
|
|
||||||
alert(res.msg.data.message);
|
if (res.status == 400) {
|
||||||
|
if (data.message == "validation error") {
|
||||||
|
alert(data.data.message);
|
||||||
} else {
|
} else {
|
||||||
alert(res.msg.message);
|
alert("Something went wrong");
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!res.error) {
|
|
||||||
alert("You have been successfully registered. Please Log In");
|
|
||||||
router.replace("/login");
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
alert("Passwords are not same!");
|
if (res.status == 201) {
|
||||||
|
alert("You have been successfully registered. Please Log In");
|
||||||
|
router.replace("/login");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
|
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
|
||||||
"files": {
|
"files": {
|
||||||
"ignore": [".expo/", ".vscode/", "node_modules/"]
|
"ignore": [".expo/", ".vscode/", "node_modules/", "dist/"]
|
||||||
},
|
},
|
||||||
"organizeImports": {
|
"organizeImports": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
"start": "expo start",
|
"start": "expo start",
|
||||||
"android": "expo start --android",
|
"android": "expo start --android",
|
||||||
"ios": "expo start --ios",
|
"ios": "expo start --ios",
|
||||||
"web": "expo start --web"
|
"web": "expo start --web",
|
||||||
|
"build:web": "npx expo export",
|
||||||
|
"format": "npx @biomejs/biome format --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/metro-runtime": "~3.2.1",
|
"@expo/metro-runtime": "~3.2.1",
|
||||||
|
Reference in New Issue
Block a user