Welcome to the SISTN_Web repository, the source code for SISTN (Society of Information Science & Technology Nigeria)'s official website. This website was developed using React with Vite as the build tool, providing a streamlined and efficient development process.
- About the Project
- Getting Started
- Development
- Making Changes
- Building for Production
- Deploying to Hostinger
- PHP Server Setup
- Deploying the PHP Server to Hostinger
- Technology Used
SISTN_Web is designed to present the organization's mission, events, resources, and contact information to its members and the public. It provides a professional and engaging interface, built to be user-friendly, mobile-responsive, and easily maintainable.
To set up the repository for local development, make sure you have Node.js and npm installed on your machine.
git clone https://github.com/your-username/SISTN_Web.git
cd SISTN_Web
Use npm or yarn to install all required packages:
npm install
or
yarn
To start the development server and view the project on your local machine, use the following command:
npm run dev
This will run the development server on http://localhost:5173 by default (or another port if 5173 is in use). Vite will automatically hot-reload changes, so any modifications you make will be visible without needing to refresh the browser.
The key folders are as follows:
- src/: Contains all source code, including components, assets, styles, and configuration files.
- public/: Contains public assets, such as the favicon, which are served as-is.
- Navigate to
src/shared/components
for any reusable UI elements orsrc/views/pages
for individual pages. - Modify the desired component or page.
- Save your changes, and they will automatically reflect in the development server thanks to Vite's hot module replacement (HMR).
The main stylesheets and CSS configurations are stored in src/assets/scss
. Update the global styles here or in src/style.css
to maintain consistency across the website.
For SASS reference, visit SASS Docs
TailwindCSS is also being used, check the tailwind.config.js file to make your changes to how tailwind is being used in this project. For reference, visit Tailwind Docs
To prepare the website for deployment, build the project with the following command:
npm run build
This will generate a dist
folder containing the minified and optimized code for production. The dist
folder will include all assets, JavaScript, HTML, and CSS files necessary to deploy the site.
To host this website on Hostinger, follow these steps:
-
Upload the
dist
Folder:- Use an FTP client (e.g., FileZilla) or the Hostinger File Manager to upload the entire
dist
folder to the server. - Make sure it’s uploaded to the public_html directory if this is the primary site or into a specific directory if it’s a subdomain.
- Use an FTP client (e.g., FileZilla) or the Hostinger File Manager to upload the entire
-
Configure the Server:
- In Hostinger, ensure your domain or subdomain is pointing to the uploaded folder.
- If any server configuration is needed (like
.htaccess
for URL rewriting), add it directly to thedist
folder.
-
Test the Deployment:
- Visit your domain to verify that the website is running correctly.
Certainly! Here’s the additional section you requested:
In addition to the main SISTN_Web frontend, there's also a PHP server component for handling backend operations. Follow these instructions to set up and deploy the PHP server.
To run the PHP server on your local machine, follow these steps:
-
Install PHP: Ensure PHP is installed on your system. You can verify by running:
php -v
If PHP is not installed, download and install it from https://www.php.net/downloads.
-
Navigate to the PHP Server Directory: Go to the
php_server
directory within the project:cd php_server
-
Start the PHP Server: Start a local PHP server using:
php -S localhost:8000
This will run the server on http://localhost:8000.
-
Configuration Settings:
- Adjust any necessary configurations in the
php_server/config.php
file. This may include settings for database connections, API endpoints, or environment variables. - Ensure the configuration matches your local development setup.
- Adjust any necessary configurations in the
To deploy the PHP server on Hostinger, follow these steps:
-
Upload the
php_server
Folder:- Using an FTP client (like FileZilla) or the Hostinger File Manager, upload the entire
php_server
folder to the Hostinger server. - Place it in the public_html directory or a specific subdirectory if it’s part of a subdomain.
- Using an FTP client (like FileZilla) or the Hostinger File Manager, upload the entire
-
Configure Server Settings:
- Edit the
php_server/config/database.php
file on the server to ensure all settings (e.g., database credentials, API keys) are correct for production.
- Edit the
-
Test the PHP Server:
- Visit
yourdomain.com/php_server
(or the respective URL path) to ensure the PHP server is running correctly on Hostinger. - If you need URL rewriting or additional server configurations, add these settings to the
.htaccess
file in thephp_server
directory.
- Visit
By following these instructions, you’ll be able to run and deploy the PHP server component of SISTN_Web effectively.
- React.js: For building the user interface with a component-based architecture.
- Vite: A next-generation build tool for faster development and optimized production builds.
- TailwindCSS: Utility-first CSS framework for styling the application.
- SASS: CSS preprocessor used for styling and improving maintainability.
- PHP: For server-side logic and handling dynamic content.
- MySQL: Used for database management.
- Hostinger: Hosting platform for deploying the application.
- FTP: For transferring files to the server.
- Node.js: JavaScript runtime for building the frontend.
- npm/yarn: For managing dependencies and scripts.
- Git: Version control for managing the codebase.
Each time you make changes and rebuild the project, repeat the upload steps above with the newly generated dist
folder.