Skip to content

Commit 4d40573

Browse files
committed
project initialization
1 parent 0657eac commit 4d40573

28 files changed

+10502
-60
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Warning: Do not add secrets (API keys and similar) to this file, as it source controlled!
2+
# Use `.env.local` for any secrets, and ensure it is not added to source control
3+
4+
NEXT_PUBLIC_SANITY_PROJECT_ID="zn7egx85"
5+
NEXT_PUBLIC_SANITY_DATASET="production"

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.github/workflows/main.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Docker Build and Run
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: self-hosted
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Build and run Docker container
17+
env:
18+
NODE_ENV: production
19+
run: |
20+
docker build -t nibmcs-web-app .
21+
docker run -p 3000:3000 nibmcs-web-app

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Use an official Node.js runtime as the base image
2+
FROM node:18
3+
4+
# Set the working directory in the container
5+
WORKDIR /src/app
6+
7+
# Copy package.json and package-lock.json to the container
8+
COPY package*.json ./
9+
10+
# Install project dependencies
11+
RUN npm install
12+
13+
# Copy the rest of the application code to the container
14+
COPY . .
15+
16+
# Build the Next.js app
17+
RUN npm run build
18+
19+
# Expose the port that the Next.js app will run on
20+
EXPOSE 3000
21+
22+
# Specify the command to run the Next.js app
23+
CMD ["npm", "start"]

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,107 @@
1-
# nibmcs.github.io
2-
The official GitHub profile site for the NIBM Computing Society.
1+
# NIBM Computing Society Website
2+
3+
Welcome to the NIBM Computing Society website repository. This website is built using Next.js as the frontend framework and Sanity as the content management system (CMS).
4+
5+
## About NIBM Computing Society
6+
7+
[NIBM Computing Society](https://nibmcs.org) is a student community organization for the National Institute of Business Management (NIBM) in Sri Lanka. Our mission is to enable students to learn, share, and build their careers in the field of computing and technology.
8+
9+
## Features
10+
11+
- Responsive and modern web design
12+
- Dynamic content management using Sanity CMS
13+
- Upcoming events and news updates
14+
- Membership and contact information
15+
- Community leaderboard
16+
17+
## Technologies Used
18+
19+
- [Next.js](https://nextjs.org/) - A React framework for building fast and scalable applications.
20+
- [Sanity](https://www.sanity.io/) - A headless CMS that provides a powerful and flexible content backend.
21+
- [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework for rapidly building custom designs.
22+
23+
## Getting Started
24+
25+
Follow these steps to set up and run the project locally:
26+
27+
1. **Clone this repository to your local machine:**
28+
29+
```bash
30+
git clone https://github.com/nibmcs/nibmcs.org.git
31+
cd nibmcs.org
32+
```
33+
34+
2. **Install the dependencies:**
35+
36+
Before running the application, you need to install the project's dependencies. This can be done using Node.js. If you haven't already installed Node.js, you can download it from the [official website](https://nodejs.org/).
37+
38+
```bash
39+
npm install
40+
```
41+
42+
3. **Configure Sanity:**
43+
44+
To manage content for the NIBM Computing Society website, you'll need to set up your own Sanity account and project.
45+
46+
Create an account & make a new project. Get project ID and run this:
47+
48+
```bash
49+
npm create sanity@latest -- --project zn7egx85 --dataset production --provider google
50+
```
51+
52+
If you have questions or need assistance with Sanity, please refer to the official [Sanity documentation](https://www.sanity.io/docs) or contact Sanity support for guidance.
53+
54+
4. **Local Development**:
55+
56+
You can choose one of the following methods for local development:
57+
58+
**Using Docker**:
59+
60+
If you prefer to use Docker for local development, follow these steps:
61+
62+
```bash
63+
# Build the Docker image
64+
docker build -t nibmcs-website .
65+
66+
# Run the Docker container
67+
docker run -p 3000:3000 nibmcs-website
68+
```
69+
70+
This will build a Docker image for the website and run it on port 3000. After running the container, you can access the website by opening your web browser and visiting http://localhost:3000.
71+
72+
**Local Development (Without Docker)**:
73+
74+
If you prefer not to use Docker, you can run the application using Node.js. Make sure you have Node.js installed on your machine. Just run:
75+
76+
```bash
77+
# Start the development server
78+
npm run dev
79+
```
80+
81+
This will start the application without Docker, and you can access it by opening your web browser and visiting http://localhost:3000.
82+
83+
## Contributing
84+
85+
We welcome contributions from the community to improve the NIBM Computing Society website. If you'd like to contribute, please follow these guidelines:
86+
87+
1. Fork this repository.
88+
2. Create a new branch for your feature or bug fix: `git checkout -b feature/your-feature-name` or `git checkout -b bugfix/issue-number`.
89+
3. Make your changes and commit them with descriptive commit messages.
90+
4. Push your changes to your fork: `git push origin feature/your-feature-name`.
91+
5. Open a pull request to the `main` branch of this repository.
92+
93+
We will review your pull request and collaborate with you to merge it into the project.
94+
95+
## License
96+
97+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
98+
99+
## Contact
100+
101+
If you have any questions, suggestions, or need assistance, please feel free to contact us:
102+
103+
- Email: [info@nibmcs.org](mailto:info@nibmcs.org)
104+
- Twitter: [@nibmcs](https://twitter.com/nibmcs)
105+
- LinkedIn: [NIBM Computing Society](https://www.linkedin.com/company/nibmcs/)
106+
107+
We look forward to hearing from you and appreciate your contributions!

index.html

Lines changed: 0 additions & 37 deletions
This file was deleted.

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {}
3+
4+
module.exports = nextConfig

0 commit comments

Comments
 (0)