Skip to content

πŸ“‚ File management system for PRACTA. Securely store, manage, and serve user-generated content with a focus on performance, accessibility, and scalability.

License

Notifications You must be signed in to change notification settings

PRACTAcademy/files.practa.tech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PRACTA SE File Server

This is a simple Express.js server that connects to a DigitalOcean Spaces bucket to list and serve PDF files β€” primarily used to distribute Simulated Exams (SEs) for the PRACTA community.

πŸ“ This service provides a user-friendly interface and a JSON API to access available SEs.

⚠️ All SEs are for practice and should not be considered official content.

πŸ”— Visit: https://files.practa.tech


πŸš€ Endpoints

1. /

  • Method: GET
  • Description: Renders an HTML page listing all SEs (.pdf files).
  • Includes: File sizes and a friendly PRACTA usage warning.

2. /files

  • Method: GET

  • Description: Returns a JSON array of all available SEs with:

    • name
    • size
    • url
  • Example Response:

[
  {
    "name": "PRACTA_SE_Math1.pdf",
    "size": "324.56 KB",
    "url": "http://files.practa.tech/download?file=PRACTA_SE_Math1.pdf"
  }
]

3. /download

  • Method: GET
  • Query Param: file (required)
  • Description: Downloads the specified file directly from the bucket.
  • Example:
    http://files.practa.tech/download?file=PRACTA_SE_Math1.pdf

🌱 Environment Variables

You must create a .env file in the root with the following:

DO_SPACES_ENDPOINT=nyc3.digitaloceanspaces.com
DO_SPACES_KEY=your-access-key
DO_SPACES_SECRET=your-secret-key
DO_SPACES_BUCKET=practa-se-files

⚠️ Never commit your .env file to version control.


πŸ› οΈ Installation & Running

# 1. Clone the repo
git clone https://github.com/PRACTAcademy/files.practa.tech.git

# 2. Navigate into project
cd se-file-server

# 3. Install dependencies
npm install

# 4. Start the server
npm start

πŸ“¦ Built With


🀝 Contributing

We welcome your contributions to improve this server and make SE access even better for PRACTA members!

  • Fork the repo
  • Create a branch (fix/se-listing, feat/download-logging, etc.)
  • Commit your changes
  • Open a pull request

For major changes, please open an issue first.


πŸ“« Contact

About

πŸ“‚ File management system for PRACTA. Securely store, manage, and serve user-generated content with a focus on performance, accessibility, and scalability.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project