Here are the contents of the first 20 files in the structure:
- README.md
# Upfinity
Upfinity is a self-hosted status/uptime management solution that replicates the functionality of Uptime Robot without any paywalls and with additional features. It includes a full web interface, custom domains, email and SMS alerts, monitors, status pages, and an API.
## Features
- Web UI for managing monitors and status pages
- Custom domains
- Email and SMS alerts
- API for integration with other services
- Modern and slick design
## Installation
1. Clone the repository
2. Install dependencies: `npm install`
3. Configure your environment variables in the `.env` file
4. Start the server: `npm start`
5. Access the web interface at `http://localhost:3000`
## License
This project is licensed under the MIT License.
- LICENSE
MIT License
Copyright (c) 2022 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- .gitignore
node_modules/
dist/
.env
- index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upfinity</title>
<link rel="stylesheet" href="public/assets/css/bootstrap.min.css">
<link rel="stylesheet" href="public/assets/css/main.css">
<link rel="icon" href="public/assets/images/favicon.png">
</head>
<body>
<div id="root"></div>
<script src="public/assets/js/jquery.min.js"></script>
<script src="public/assets/js/bootstrap.min.js"></script>
<script src="public/assets/js/main.js"></script>
</body>
</html>
-
favicon.ico
This file should contain the favicon image in ICO format. You can generate one using an online favicon generator like https://www.favicon-generator.org/.
-
package.json
{
"name": "upfinity",
"version": "1.0.0",
"description": "A self-hosted status/uptime management solution",
"main": "server.js",
"scripts": {
"start": "node server.js",
"dev": "webpack serve --mode development",
"build": "webpack --mode production"
},
"author": "Your Name",
"license": "MIT",
"dependencies": {
"axios": "^0.26.1",
"bcrypt": "^5.0.1",
"body-parser": "^1.19.1",
"dotenv": "^10.0.0",
"express": "^4.17.3",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.1.3",
"nodemailer": "^6.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.2.2",
"twilio": "^3.71.1"
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-react": "^7.16.5",
"babel-loader": "^8.2.3",
"css-loader": "^6.6.0",
"html-webpack-plugin": "^5.5.0",
"sass": "^1.45.0",
"sass-loader": "^12.4.0",
"style-loader": "^3.3.1",
"typescript": "^4.5.4",
"ts-loader": "^9.2.6",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.7.3"
}
}
-
package-lock.json
This file will be generated automatically when you run npm install. It contains the exact dependency tree that was installed.
-
webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.tsx',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader']
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html'
})
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 3000
}
};
- tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": ["src"]
}
-
public/assets/images/logo.png
This file should contain the logo image in PNG format. You can create one using an image editor or find a suitable image online.
-
public/assets/images/favicon.png
This file should contain the favicon image in PNG format. You can create one using an image editor or find a suitable image online.
-
public/assets/css/main.css
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
background-color: #333;
padding: 20px;
color: #fff;
text-align: center;
}
.footer {
background-color: #333;
padding: 20px;
color: #fff;
text-align: center;
margin-top: 50px;
}
-
public/assets/css/bootstrap.min.css
This file should contain the minified version of the Bootstrap CSS library. You can download it from https://getbootstrap.com/docs/5.3/getting-started/download/.
-
public/assets/js/main.js
document.addEventListener('DOMContentLoaded', function() {
console.log('Upfinity is ready!');
});
-
public/assets/js/jquery.min.js
This file should contain the minified version of the jQuery library. You can download it from https://jquery.com/download/.
-
public/assets/js/bootstrap.min.js
This file should contain the minified version of the Bootstrap JavaScript library. You can download it from https://getbootstrap.com/docs/5.3/getting-started/download/.
-
src/components/Header/Header.tsx
import React from 'react';
import './header.scss';
const Header: React.FC = () => {
return (
<header className="header">
<h1>Upfinity</h1>
</header>
);
};
export default Header;
- src/components/Header/header.scss
.header {
background-color: #333;
padding: 20px;
color: #fff;
text-align: center;
}
- src/components/Footer/Footer.tsx
import React from 'react';
import './footer.scss';
const Footer: React.FC = () => {
return (
<footer className="footer">
<p>© 2022 Upfinity. All rights reserved.</p>
</footer>
);
};
export default Footer;
- src/components/Footer/footer.scss
.footer {
background-color: #333;
padding: 20px;
color: #fff;
text-align: center;
margin-top: 50px;
}
These are the contents of the first 20 files in the structure. Please note that some files, like images and minified libraries, cannot be provided as text content. You should download or create those files as needed.