const express = require('express'); const jwt = require('jsonwebtoken'); const bcrypt = require('bcryptjs'); const { check, validationResult } = require('express-validator'); const router = express.Router(); // User Model const User = require('./models/User'); // Register Route for Studio Owners router.post( '/register', [ check('email', 'Please include a valid email').isEmail(), check('password', 'Password is required').exists(), ], async (req, res) => { const errors = validationResult(req); if (!errors.isEmpty()) { return res.status(400).json({ errors: errors.array() }); } const { email, password, role } = req.body; try { let user = await User.findOne({ email }); if (user) { return res.status(400).json({ msg: 'User already exists' }); } user = new User({ email, password, role, // "Studio Owner", "Judge", etc. }); // Hash password before saving const salt = await bcrypt.genSalt(10); user.password = await bcrypt.hash(password, salt); await user.save(); // Generate JWT Token const payload = { user: { id: user.id, role: user.role, }, }; jwt.sign( payload, process.env.JWT_SECRET, { expiresIn: 3600 }, (err, token) => { if (err) throw err; res.json({ token }); } ); } catch (err) { console.error(err.message); res.status(500).send('Server error'); } } ); module.exports = router; HOME | Dance Nation Utah
top of page
DN Photo 6.JPG

COMPETITIONS

2025

March 7-8, 2025

American Fork, UT
American Fork Jr. High School
AUDITORIUM ONLY!

April 18-19, 2025

Magna, UT
Cyprus High School
AUDITORIUM ONLY!

May 2-3, 2025

Kaysville, UT
Davis High School
AUDITORIUM ONLY!

American Fork Jr. High School.jpg
Cyprus High School.jpg
Davis High.jpg

WHY CHOOSE DANCE NATION?

  • High quality Dance Nation jackets for high point solo routines in each age division, overall high point duet or trio, as well as ultimate high point team!

  • AWARDS, AWARDS, & MORE AWARDS!

  • Photos by professional photographer

  • Classy sweepstakes banners and plaques

  • Director/coaches gifts!

  • Hospitality Room

  • Marley floors laid on every stage/gym

  • Dance Nation App with an easy to read program for free

  • Additional awards for choreography, technique, and showmanship

  • Audio commentary from qualified, experienced judges

  • Organized, competitive, and fun competitions

  • 1st place soloists are awarded tiaras or Dance Nation cap

  • BEAUTIFUL personalized team trophy

  • Variety of age divisions and skill levels

  • Experienced Dance Nation coordinators 

  • And much more!

bottom of page